Skip to content

Commit

Permalink
fix: Remove event type from sub list when unsubscribing
Browse files Browse the repository at this point in the history
  • Loading branch information
zachowj committed Oct 11, 2019
1 parent 4ba36c8 commit 321561d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ha-websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class HaWebsocket extends EventEmitter {
if (e !== '__ALL__') {
this.unsubEvents[e]();
delete this.unsubEvents[e];
this.subscribedEvents.delete(e);
}
});

Expand All @@ -105,7 +106,6 @@ class HaWebsocket extends EventEmitter {
this.onClientEvents(ent)
);

this.subscribedEvents.clear();
this.subscribedEvents.add('__ALL__');
return;
}
Expand Down

0 comments on commit 321561d

Please sign in to comment.