❔ ClientWebSocket silently disconnecting after some time
After like 10 minutes of no activity, the websocket I'm connected to closes the connection without informing the client. Currently I just handle the exception and reconnect, but i wonder if there is a way to keep the connection open so this doesn't happen. Thanks in advance!
3 Replies
I have no control on the server side of things btw
if the connection is being used consistently (like, with a heartbeat), I don't think there's anything you can do.
the connection is closing because
A) you're closing it
B) the server is closing it
C) it's hitting an idling timeout
D) network instability
Only A and C would be in your control, and they're kinda obvious, so presumably you've checked for those
you should be getting some kinda code or status, on close, IIRC
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.