rsocket-js
rsocket-js copied to clipboard
Fix error messages in `onError` and in `onNext`
State error messages Flowable: Invalid call to onXxx(): onComplete/onError was already called.' / Flowable: Invalid call to onXxx(): onSubscribe has not been called.' are printed correctly now in onError and onNext methods.
Motivation:
Previously, state error message Flowable: Invalid call to onXxx(): onSubscribe has not been called.' was printed always regardles of the actual state of FlowableSubscriber. Even on attempt to operate on FlowableSubscriber when flow was completed already (either by prior call to onError or onComplete method).
Note: State error message in onComplete method works correctly already.
Modifications:
Checks for this._active are replaced with this._started.
Result:
State error message Flowable: Invalid call to onXxx(): onComplete/onError was already called.' is printed on attempt to operate on FlowableSubscriber when flow is completed already.