{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/2037","repository_url":"https://api.github.com/repos/ReactiveX/rxjs","labels_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/2037/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/2037/comments","events_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/2037/events","html_url":"https://github.com/ReactiveX/rxjs/issues/2037","id":183126288,"node_id":"MDU6SXNzdWUxODMxMjYyODg=","number":2037,"title":"Unsubscribing from WebSocketSubject reference to Websocket","user":{"login":"webstp","id":10817061,"node_id":"MDQ6VXNlcjEwODE3MDYx","avatar_url":"https://avatars0.githubusercontent.com/u/10817061?v=4","gravatar_id":"","url":"https://api.github.com/users/webstp","html_url":"https://github.com/webstp","followers_url":"https://api.github.com/users/webstp/followers","following_url":"https://api.github.com/users/webstp/following{/other_user}","gists_url":"https://api.github.com/users/webstp/gists{/gist_id}","starred_url":"https://api.github.com/users/webstp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webstp/subscriptions","organizations_url":"https://api.github.com/users/webstp/orgs","repos_url":"https://api.github.com/users/webstp/repos","events_url":"https://api.github.com/users/webstp/events{/privacy}","received_events_url":"https://api.github.com/users/webstp/received_events","type":"User","site_admin":false},"labels":[{"id":187400551,"node_id":"MDU6TGFiZWwxODc0MDA1NTE=","url":"https://api.github.com/repos/ReactiveX/rxjs/labels/type:%20bug","name":"type: bug","color":"fc2929","default":false}],"state":"closed","locked":false,"assignee":{"login":"benlesh","id":1540597,"node_id":"MDQ6VXNlcjE1NDA1OTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1540597?v=4","gravatar_id":"","url":"https://api.github.com/users/benlesh","html_url":"https://github.com/benlesh","followers_url":"https://api.github.com/users/benlesh/followers","following_url":"https://api.github.com/users/benlesh/following{/other_user}","gists_url":"https://api.github.com/users/benlesh/gists{/gist_id}","starred_url":"https://api.github.com/users/benlesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlesh/subscriptions","organizations_url":"https://api.github.com/users/benlesh/orgs","repos_url":"https://api.github.com/users/benlesh/repos","events_url":"https://api.github.com/users/benlesh/events{/privacy}","received_events_url":"https://api.github.com/users/benlesh/received_events","type":"User","site_admin":false},"assignees":[{"login":"benlesh","id":1540597,"node_id":"MDQ6VXNlcjE1NDA1OTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1540597?v=4","gravatar_id":"","url":"https://api.github.com/users/benlesh","html_url":"https://github.com/benlesh","followers_url":"https://api.github.com/users/benlesh/followers","following_url":"https://api.github.com/users/benlesh/following{/other_user}","gists_url":"https://api.github.com/users/benlesh/gists{/gist_id}","starred_url":"https://api.github.com/users/benlesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlesh/subscriptions","organizations_url":"https://api.github.com/users/benlesh/orgs","repos_url":"https://api.github.com/users/benlesh/repos","events_url":"https://api.github.com/users/benlesh/events{/privacy}","received_events_url":"https://api.github.com/users/benlesh/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-10-14T18:59:41Z","updated_at":"2018-06-06T23:40:38Z","closed_at":"2016-10-24T20:46:59Z","author_association":"NONE","body":"rxjs@5.0.0-rc.1\n\nWhen 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\n\nI believe this was introduced in [62d242e](https://github.com/ReactiveX/rxjs/commit/62d242ecf5c7b513c86aceb6e6836efe6ddc909f).\n\nRelevant Code\n\n``` ts\nprotected _subscribe(subscriber: Subscriber<T>): Subscription {\n    const { source } = this;\n    if (source) {\n      return source.subscribe(subscriber);\n    }\n    if (!this.socket) {\n      this._connectSocket();\n    }\n    let subscription = new Subscription();\n    subscription.add(this._output.subscribe(subscriber));\n    subscription.add(() => {\n      const { socket } = this;\n      if (this._output.observers.length === 0 && socket && socket.readyState === 1) {\n        socket.close();\n      }\n      this._resetState(); //This is where to socket reference is getting lost\n    });\n    return subscription;\n  }\n```\n"},"comment":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/comments/395247361","html_url":"https://github.com/ReactiveX/rxjs/issues/2037#issuecomment-395247361","issue_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/2037","id":395247361,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTI0NzM2MQ==","user":{"login":"lock[bot]","id":33595554,"node_id":"MDM6Qm90MzM1OTU1NTQ=","avatar_url":"https://avatars1.githubusercontent.com/in/6672?v=4","gravatar_id":"","url":"https://api.github.com/users/lock%5Bbot%5D","html_url":"https://github.com/apps/lock","followers_url":"https://api.github.com/users/lock%5Bbot%5D/followers","following_url":"https://api.github.com/users/lock%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/lock%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/lock%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lock%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/lock%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/lock%5Bbot%5D/repos","events_url":"https://api.github.com/users/lock%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/lock%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-06-06T23:40:38Z","updated_at":"2018-06-06T23:40:38Z","author_association":"NONE","body":"This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.\n"}}
{"actor":{"display_login":"lock"}}