2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-24 10:58:29 +00:00
pyrogram/docs/source/faq/socket-send-raised-exception-oserror-timeouterror.rst

13 lines
548 B
ReStructuredText
Raw Normal View History

2022-01-07 10:18:51 +01:00
socket.send() raised exception, OSError(), TimeoutError()
=========================================================
2022-04-24 11:56:07 +02:00
If you get this error chances are you are blocking the event loop for too long, most likely due to an improper use of
non-asynchronous or threaded operations which may lead to blocking code that prevents the event loop from running
properly.
2022-01-07 10:18:51 +01:00
2022-04-24 11:56:07 +02:00
You can consider the following:
- Use Pyrogram asynchronously in its intended way.
- Use shorter non-asynchronous processing loops.
- Use ``asyncio.sleep()`` instead of ``time.sleep()``.