-
Notifications
You must be signed in to change notification settings - Fork 284
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
WebSocket disconnect from Slack after ~1m #1471
Comments
Could it be that it expects keep-alive messages? Since nothing is sent, I don't know either how to debug this apart from trying to send something. But you should use |
The log I posted doesn't include message to make it more readable. It could somehow be related to the ping functionality, as most of the time the close happen in the vicinity of this even, though not all the time.
That was my initial though, however its not what the example shows. |
After one of my colleague rolled out his own slack bot, it comes down to the fact that Slack believe the client hung up and closes the connection. Slack support WebSocket ping, but know that some browser might not, so they have a fallback "ping" packet, which I sent every 5 seconds in order to keep the connection kickin'. Trying to leave a bot open did however uncover another issue. I came back to my bot after a couple of hour, and had the following output:
Looking at the WebSocket code quickly, the only place So currently the WebSocket implementation open a new FD every [ping interval]. |
With the |
Last time I tried, it still did, but I didn't spend time investigating. I'll try to run the test code again soon ™️ |
- Fixes server initiated PINGs to be properly masked - Fixes the detection logic for matching PONG messages - Uses send() to send control messages instead of manually assembling frames - Streamlines processing of control messages
Fix WebSocket ping logic. Fixes #1471.
Looks like everything is working correctly, thanks again ! |
I am trying to interface with slack using Vibe.d.
I am successfully connecting, sending messages and receiving them.
However after less than a minute (Usually from 26 to 50s), I get disconnected.
Slack very rarely closes WebSocket connection so I am assuming it is something on Vibe.d side.
The code is however very simple ATM:
Any suggestion on how to debug this ?
The text was updated successfully, but these errors were encountered: