SignalR-samples icon indicating copy to clipboard operation
SignalR-samples copied to clipboard

Server side: OnDisconnectedAsync call occurs at different intervals when Wi-Fi is turned off.

Open kapitaneo opened this issue 6 years ago • 5 comments
trafficstars

Hello to all. Please help solve problem. I've issue with calling OnDisconnectedAsync method when IPad wi-fi turned off, calling may be happen fast but some times it takes a long time more 10 minutes, but some times never. I need a stable disconnect calling for example 30 seconds. I use signalR 1.1.0 with default KeepAliveInterval and ServerTimeout. How I can manage this? I hope I don't have to do a manual check of the client to disconnect. It'll be terrible:(

Thx for help.

kapitaneo avatar Jun 30 '19 11:06 kapitaneo

Are you using SignalR 1.1.0 on both the client and server side?

BrennanConroy avatar Jul 01 '19 15:07 BrennanConroy

Yes, you're right, but if I understand right problem in server side because when wi-fi off client doesn't have opportunity send response without internet connection. Or I've wrong thoughts about it?

kapitaneo avatar Jul 02 '19 05:07 kapitaneo

In 1.1.0 we added client-side pinging so that the server can call OnDisconnectedAsync within the configured timeout (30 seconds by default). That's why I was wondering about the version of the client, because if you're using 1.0.0 then the client wont initiate the pings and the server wont start the timer to timeout the connection.

BrennanConroy avatar Jul 03 '19 16:07 BrennanConroy

In client use "@aspnet/signalr": "^1.1.4" Are there may be differences?

kapitaneo avatar Jul 04 '19 05:07 kapitaneo

Could you gather server and client side logs as detailed here: https://docs.microsoft.com/en-us/aspnet/core/signalr/diagnostics?view=aspnetcore-2.2

BrennanConroy avatar Jul 09 '19 20:07 BrennanConroy