-
Notifications
You must be signed in to change notification settings - Fork 261
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
wai-websockets long quiet connections #232
Comments
I think as implemented right now, there isn't any timeout on websockets apps. Are you seeing different behavior? |
With Started server, opened connection in three different browsers and done nothing for a while:
I tried with example in |
Ahh, good point. I'm not opposed at all to having longer timeouts for raw connections, but most likely you're going to want to add a ping to the protocol to prevent these kinds of timeouts. |
Sending ping-pongs doesn't just work. You have to disable warp timeouts and handle liveness inside websocket application, that you have to do anyway. TL;DR I tried adding ping-pongs and them didn't work. The timeout manager strikes still as ping-pongs are read/written inside websocket application, so there aren't any automatic timeout tickling. It's also impossible to tickle by hand (breaking abstractions) as you cannot get For simple client-based ping look at: phadej@5d2a23a :
|
OK, that's just a bug, and not a surprising one, given that I thought I'd disabled timeout handling entirely for raw responses. For now, I've pushed a conservative commit: tickling the timeout handler each time a send or receive occurs in a raw response (129b332). |
Seems to work for my sample app (with client ping)! Thanks! |
Should we create a new issue about disabling timeout handling for the raw responses, to start a discussion about? |
Yes, please do. |
Is it possible to have different kill timeout for threads serving
websocketsApp
. With otherwise reasonable whole warp instance wide 30 seconds timeout bundled chat example application is not usable in quiet chat rooms?The text was updated successfully, but these errors were encountered: