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 #99

Conversation

vulzee
Copy link
Contributor

@vulzee vulzee commented May 26, 2023

Fixes issue #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.

@Odonno
Copy link
Owner

Odonno commented May 27, 2023

Looks good to me.

@Odonno Odonno merged commit 6e4998d into Odonno:master May 27, 2023
1 check passed
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.

None yet

2 participants