Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 2, 2020. It is now read-only.

Commit ac2a353

Browse files
committed
remove all subscribed channels after socket is closed
1 parent 15589dd commit ac2a353

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/index.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ export default class ClusterWS {
110110
}
111111
};
112112
this.websocket.onclose = (event: CloseEvent): void => {
113+
if (!this.options.autoResubscribe) {
114+
this.channels = {}
115+
}
113116
clearTimeout(this.pingTimeout)
114117
this.events.emit('disconnect', event.code, event.reason)
115118

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /