C
C#17mo ago
CorteX

❔ 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
CorteX
CorteX17mo ago
I have no control on the server side of things btw
JakenVeina
JakenVeina17mo ago
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
Accord
Accord17mo ago
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.
Want results from more Discord servers?
Add your server