mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-01 14:55:12 +00:00
Improvements to the documentation
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
socket.send() raised exception, OSError(), TimeoutError()
|
||||
=========================================================
|
||||
|
||||
If you get this error chances are you are blocking the event loop for too long.
|
||||
In general, it means you are executing thread-blocking code that prevents the event loop from
|
||||
running properly. For example:
|
||||
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.
|
||||
|
||||
- You are using ``time.sleep()`` instead of ``asyncio.sleep()``.
|
||||
- You are running processing loops that take too much time to complete.
|
||||
- You are reading/writing files to disk that take too much time to complete.
|
||||
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()``.
|
||||
|
Reference in New Issue
Block a user