You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem to figure out how should I handle a disconnect case, my bot keeps disconnecting from time to time (either the irc network issue, or something on my end), the on_disconnect event doesn't get fired. Much obliged for a snippet.
The text was updated successfully, but these errors were encountered:
There are lots of conditions that can lead to disconnects (other than explicit client disconnect):
Server disconnects the client.
Client disconnects from the server (at OS level).
Intermediate network connectivity drops (temporarily, such as in outage).
Some intermediate network node drops the connection (blocked traffic, explicit disconnect).
The causes for these are varied, and it can be difficult to ascertain what conditions led to a disconnect or what node initiated the disconnect.
At a basic level, it's important to (a) send periodic keep-alive messages (pings), as servers may disconnect a client they believe to be idle, and (b) respond to keep-alive messages from the server.
If you're doing both of these, the best advice I can give is to inspect the client and attempt to elicit more detail about when the disconnects happen and why. Start with: how do you know your client is disconnected? Can you tell when the disconnection happened?
I can't seem to figure out how should I handle a disconnect case, my bot keeps disconnecting from time to time (either the irc network issue, or something on my end), the on_disconnect event doesn't get fired. Much obliged for a snippet.
The text was updated successfully, but these errors were encountered: