Call onClosed
or provide an onStopped
method to be called when the connection is stopped in certain cases
#55765
Labels
area-signalr
Includes: SignalR clients and servers
Is there an existing issue for this?
Describe the bug
I was running a Flutter app that uses on its android side the signalr java client.
In the android side (the java client), I listen to the onClosed callback from the java client to schedule automatice reconnects in my app.
I was doing a heavy download on my wifi network which was taking the bandwidth from all other apps including my app mentioned above, so the activatePingTimer method appears to have timedout and called the private stop method.
The problem is that this private
stop
method, does not call theonClosed
callback registered by my app, so my app never knew the connection was closed so that it can reschedule an auto-reconnect.I know that the
onClosed
callback is documented asBut does not this case indicate that connection is closed?
If this is a bug, then the private
stop
method should call theonClosed
callbacks.Else if this is how its intended to work, then can you provide a way to listen to when the connection stops?
(Whats the difference anyway between "stop" and "close", other than that "close" disposes the resources associated with the object?)
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
Here is a part of the logs
(I removed my app logs from the logs above)
The text was updated successfully, but these errors were encountered: