This should be fixed in the SDK. I am the author of the SDK and I remember that I tested this case. It is handled by this line: https://github.com/ringcentral/RingCentral.Net/blob/master/RingCentral.Net.WebSocket/WebSocketExtension.cs#L39
Could you please elaborate how to reproduce this issue? Like wait how long to have it disconnected?
Hi Tyler,
Yeah it`s hard to tell exactly what is going on, we are trying to figure it out, the code is very simple.
From what we figured out so far, it does not seem to be the websocket connection not working, but instead that the subscription is not longer receiving messages.
We were able to test this by doing:
wsExtension.MessageReceived += WsExtension_MessageReceived;
And we saw that we still receive messages through the websocket. But the messages no longer make it to this part after something like 2 minutes.
var subscription = await wsExtension.Subscribe(new string[] { "/restapi/v1.0/account/~/telephony/sessions" }, async (jsonMessage) => ...
If we do a simple while loop and call: subscription.Refresh() every minute it seems like it works. But this seems to be undocumented if that is the way we are supposed to do it.
@Tyler Liu can you confirm if calling subscription.Refresh() every minute manually is the right way to go?