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

fix error and double disconnected actions on stopSignalRHub action #1

Closed

Conversation

vulzee
Copy link
Owner

@vulzee vulzee commented May 26, 2023

Fixes issue Odonno#26

I propose changing this._errorSubject.next(error); to if (error) { this._errorSubject.next(error); } due to fact this._connection.onclose emits undefined in case of gracefully stopped connection and instance of Error while the error occurred.
This eliminates throw of @ngrx/signalr/stopHub action on stopSignalRHub(hub).

To fix double @ngrx/signalr/disconnected I propose removing this._stateSubject.next(disconnected); because the this._stateSubject.next would be called in this._connection.onclose after the connection stops.

@vulzee vulzee closed this May 27, 2023
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

Successfully merging this pull request may close these issues.

1 participant