rikulo / socket.io-client-dart

socket.io-client-dart: Dartlang port of socket.io-client https://github.com/socketio/socket.io-client
https://quire.io
MIT License
675 stars 184 forks source link

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

Open ugran opened 8 months ago

ugran commented 8 months ago

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.