Open cesme opened 7 years ago
Your client needs to send Pings to the server and the server must (by standard) respond with a Pong. If there is no Pong coming, the server is not available any longer and the client can throw away connection.
I think Websockets.PCL doesn't support this at the moment. But I think you'll get an OnError on trying to send something. There should be a default time of the sockets. Shouldn't it? Try to wait some more time for this timeout. Can you provide this feedback?
I'm seeing the OnClosed event being fired, but IsOpen still returns true (on Android).
Hello, Almost a year later and the problem still happens. I have the same problem when I try to close my client-side connection. I call OnClose, the server side closes the connection, but the IsOpen flag is still true. Did someone solve this problem?
--Edit-- For a temporary workaround, I created a new variable called IsOpenedSocket in my project. When the OnClosed or OnError method is called, this flag is set to false and when the OnOpened method is called, this flag is set to true. Did work for me.
And yet another year... I guess I too will need to keep track of this myself.. even 2 years ;)
Hello,
I am using the nuget package 1.1.9 assembly versions droid 1.0.1.8 and PCL 1.0.0.8 and i am noticing that if i shutdown my server the clients will still report that IsOpen is true. Looking through the code in master i wasn't able to locate any timeouts in the Send functions that would mark the connection as closed or trigger an OnError am i missing something in the code ? Is there a proper way to set a send timeout to get the OnError to trigger to detect the server going away ?
thank you