You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When unsubscribing from a multiplex WebSocketSubject I am seeing the socket getting set to null. There are still other subscribers and the socket still exists, but we are loosing the reference to the socket
protected_subscribe(subscriber: Subscriber<T>): Subscription{const{ source }=this;if(source){returnsource.subscribe(subscriber);}if(!this.socket){this._connectSocket();}letsubscription=newSubscription();subscription.add(this._output.subscribe(subscriber));subscription.add(()=>{const{ socket }=this;if(this._output.observers.length===0&&socket&&socket.readyState===1){socket.close();}this._resetState();//This is where to socket reference is getting lost});returnsubscription;}
The text was updated successfully, but these errors were encountered:
… after first unsubscribe (#2039)
This fix ensure the observers count goes to zero before the state is reset on the WebSocketSubject instance
fixes#2037
rxjs@5.0.0-rc.1
When unsubscribing from a multiplex WebSocketSubject I am seeing the socket getting set to null. There are still other subscribers and the socket still exists, but we are loosing the reference to the socket
I believe this was introduced in 62d242e.
Relevant Code
The text was updated successfully, but these errors were encountered: