-
Notifications
You must be signed in to change notification settings - Fork 13
SSL Error #32
Comments
I'm getting the same error, the websocket is often closed after only 2 minutes of uptime. The stacktrace you are mentioning is actually because the
You get the intended reaction and the websocket library wraps itself up neatly and terminates. This does not lead anywhere though, the end result is still the same, the connection is dead :) Discord documentation states that when the server side disconnects the socket it returns an error code telling why it did so (https://discordapp.com/developers/docs/topics/gateway#disconnections) but this information is lost because the websocket library does not handle it: sanmiguel/websocket_client#48 To get to the actual reason for disconnections, we'd need the information in the close code when/if discord is deciding to cut the socket. |
I did a quick hack to update discord_ex to use discord's gateway protocol version 6, and in a couple of trials there were no more disconnects. Protocol version 4 which is currently used is deprecated and going to be removed on October 16th 2017, so the upgrade is needed anyway. |
@jussih Do you have a fork with these changes? |
@tielur https://github.com/jussih/discord_ex/tree/apiv6 The branch implements the bare minimum required to use the v6 protocol. It would be possible to detect a stale websocket due to the heartbeat ACK messages and reconnect and resume automatically, but I haven't implemented that. |
This should be fixed now that #43 is merged. |
I haven't seen this error in awhile, I'll reopen if it becomes an issue. |
Is anyone else getting these errors? They seem to continuously happen, I haven't timed exactly how far a part they happen though. I've replaced what I thought was sensitive information with
REMOVED
. It looks like it's something with the websocket library maybe?The text was updated successfully, but these errors were encountered: