Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: RuntimeError on recv & ValueError and ConnectionError on handle_packet #66

Closed
wants to merge 3 commits into from

Conversation

X-Gorn
Copy link

@X-Gorn X-Gorn commented May 26, 2024

ValueError and ConnectionError: https://github.com/pyrogram/pyrogram/issues/1263
RuntimeError: #65

This PR closes #65

@KurimuzonAkuma KurimuzonAkuma self-assigned this May 26, 2024
Logging:
```2024-05-27 07:25:20,740 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-2168258' coro=<Session.recv_worker() done, defined at /usr/local/lib/python3.9/site-packages/pyrogram/session/session.py:301> exception=AttributeError("'NoneType' object has no attribute 'read'")>
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pyrogram/session/session.py", line 305, in recv_worker
    packet = await self.connection.recv()
  File "/usr/local/lib/python3.9/site-packages/pyrogram/connection/connection.py", line 72, in recv
    return await self.protocol.recv()
  File "/usr/local/lib/python3.9/site-packages/pyrogram/connection/transport/tcp/tcp_abridged.py", line 46, in recv
    length = await super().recv(1)
  File "/usr/local/lib/python3.9/site-packages/pyrogram/connection/transport/tcp/tcp.py", line 112, in recv
    self.reader.read(length - len(data)),
AttributeError: 'NoneType' object has no attribute 'read'```
@X-Gorn X-Gorn closed this May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto restart return an Exception
2 participants