Skip to content

Commit

Permalink
fix: 多次关闭链接
Browse files Browse the repository at this point in the history
  • Loading branch information
flxxyz committed Jun 23, 2020
1 parent a82454b commit 9db1867
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class Client {
})

clearInterval(this.heartbeatTask)
this.ws.close()
}

run(websocket) {
Expand Down Expand Up @@ -147,12 +146,6 @@ class Client {
this.heartbeat()
cb.bind(this)(res)
}
} else if (clientEventName === 'disconnect') {
let cb = callback
callback = function (res) {
this.logout()
cb.bind(this)(res)
}
}
this.clientEvent[method].listener = callback.bind(this)
}
Expand Down

0 comments on commit 9db1867

Please sign in to comment.