Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please make this change in your code #90

Open
misici234 opened this issue May 17, 2022 · 2 comments
Open

Please make this change in your code #90

misici234 opened this issue May 17, 2022 · 2 comments

Comments

@misici234
Copy link

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.

@mohamedsogoba
Copy link

Hello broth ,you can signalR in background service in app is killed ?

@misici234
Copy link
Author

@mohamedsogoba I don't understand what you were talking about. I proposed a code change that has nothing to do with a background service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants