Skip to content

Commit

Permalink
fix: 掉线后禁用keep-alive
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Jun 11, 2024
1 parent 1a6c0bb commit f9980c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ export class Cluster {
this.socket.on('disconnect', (reason) => {
logger.warn(`与服务器断开连接: ${reason}`)
this.isEnabled = false
this.keepalive.stop()
})
this.socket.on('exception', (err) => {
logger.error(err, 'exception')
Expand Down

0 comments on commit f9980c7

Please sign in to comment.