felangel / web_socket_client

A simple WebSocket client for Dart which includes automatic reconnection logic.
https://pub.dev/packages/web_socket_client
MIT License
150 stars 32 forks source link

fix: remove `Disconnecting` state from `_isConnected`. #19

Closed dan12411 closed 1 year ago

dan12411 commented 1 year ago

Status

DONE

Description

The _isConnected in WebSocket including Disconnecting state, which is not belong to isConnected condition, should be removed.

To be:

  bool get _isConnected {
    final connectionState = _connectionController.state;
    return connectionState is Connected || connectionState is Reconnected;
  }

Type of Change