-
Notifications
You must be signed in to change notification settings - Fork 81
Description
I tried to create a pull request but I was denied due to permission restrictions.
It doesn't bother me as long as you make the following change in your code.
It's in the file signalr_core/blob/main/lib/src/hub_connection.dart
, line # 779 (the 2nd last in dynamic _processHandshakeResponse(dynamic data) )
_handshakeCompleter.complete();
Please surround this line with if condition and make it like this:
if (!_handshakeCompleter.isCompleted) {
_handshakeCompleter.complete();
}
You have already done the same change in the method void _connectionClosed({Exception? exception}).
The reason is that I had been getting occasional Exceptions from unprotected _handshakeCompleter.complete();
I made the change locally and tested it for a few weeks and never got this problem again.
Please make this change and let us know when you will make new release! Thanks a lot.