Skip to content

Please make this change in your code #90

@misici234

Description

@misici234

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions