sefidgaran / signalr_client

A Flutter SignalR Client for ASP.NET Core
https://pub.dev/packages/signalr_netcore
MIT License
71 stars 111 forks source link

Possible error in HubConnection._connectionClosed #43

Open rho-cassiopeiae opened 1 year ago

rho-cassiopeiae commented 1 year ago

While browsing over the source code I've found this bit in HubConnection._connectionClosed method (line 692):

  if (_connectionState == HubConnectionState.Disconnecting) {
    _completeClose(error: error);
  } else if (_connectionState == HubConnectionState.Connected) {
    _reconnect(error: error);
  } else if (_connectionState == HubConnectionState.Connected) {
    _completeClose(error: error);
  }

The last two if conditions are the same.