[X] I am sure the error is coming from Pyrogram's code and not elsewhere
[X] I have searched in the issue tracker for similar bug reports, including closed ones
[X] I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version
Description
The auto restart fails and bot stopped working.
Steps to reproduce
Make the bot having connection error and throwing OSError.
Code example
No response
Logs
Task exception was never retrieved
future: <Task finished name='Task-218707' coro=<Session.restart() done, defined at /usr/local/lib/python3.9/site-packages/pyrogram/session/session.py:183> exception=RuntimeError('read() called while another coroutine is already waiting for incoming data')>
Checklist
pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip
and reproduced the issue using the latest development versionDescription
The auto restart fails and bot stopped working.
Steps to reproduce
Make the bot having connection error and throwing OSError.
Code example
No response
Logs