dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
665 stars 155 forks source link

ConnectionClosed(self.socket, code=code) from None #533

Closed Takshoe closed 11 months ago

Takshoe commented 1 year ago

Summary

ConnectionClosed(self.socket, code=code) from None

Reproduction Steps

Multiple WebSocket closed with 1000 and the Wait time raises all the time, to more than 15 minutes.

This did not accure with the same code, 3 weeks ago. Maybe discord changed their handling or raised security.

Code

discord.client - DISCORD_MID - ERROR - Attempting a reconnect in 122.29s
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 817, in connect
    await self.ws.poll_event()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\gateway.py", line 673, in poll_event
    raise ConnectionClosed(self.socket, code=code) from None
discord.errors.ConnectionClosed: WebSocket closed with 1000

Expected Results

No WebSocket closure or faster reconnection.

Actual Results

discord.errors.ConnectionClosed and sleep times that raise from 1 second up to 1000 seconds.

System Information

Checklist

Additional Information

No response

dolfies commented 11 months ago

Are there any other error logs before or after that? If not, this just sounds like a network issue.