socket.io-client-dart icon indicating copy to clipboard operation
socket.io-client-dart copied to clipboard

Would be great to somehow catch when connection with the server is down.

Open ugran opened this issue 1 year ago • 0 comments

If I'm not mistaken socket.onDisconnect used to work but now the only way to catch connection problem is like this:

socket?.onError((data) {
      if (data.message == 'Connection refused')

Because of this socket.connected stays true even if the server is down.

ugran avatar Mar 01 '24 21:03 ugran