Skip to content

Commit 9db1867

Browse files
committed
fix: 多次关闭链接
1 parent a82454b commit 9db1867

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/client.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class Client {
7171
})
7272

7373
clearInterval(this.heartbeatTask)
74-
this.ws.close()
7574
}
7675

7776
run(websocket) {
@@ -147,12 +146,6 @@ class Client {
147146
this.heartbeat()
148147
cb.bind(this)(res)
149148
}
150-
} else if (clientEventName === 'disconnect') {
151-
let cb = callback
152-
callback = function (res) {
153-
this.logout()
154-
cb.bind(this)(res)
155-
}
156149
}
157150
this.clientEvent[method].listener = callback.bind(this)
158151
}

0 commit comments

Comments
 (0)