I propose changing this._startSubject.error(error)) to this._errorSubject.next(error)).
The result of calling this._startSubject.error(error)) puts the _startSubject into an error state and further calls to _startSubject.next() will fail silently, while subscribers to `this._startSubject.asObservable()' will immediately receive the error the error and nothing else.
Fixes issue #54.
I propose changing
this._startSubject.error(error))
tothis._errorSubject.next(error))
.The result of calling
this._startSubject.error(error))
puts the_startSubject
into an error state and further calls to_startSubject.next()
will fail silently, while subscribers to `this._startSubject.asObservable()' will immediately receive the error the error and nothing else.This causes the startHub$ effect:
to receive, catch, and then dispatch the error on the next attempt to start the hub even though the connection happens successfully without error.
I haven't experienced the same issues when calling stopHub but I imagine it would make sense to apply the same error handling.