Skip to content

Commit

Permalink
fix: 修正被服务器踹下线后重新连接,会开始双心跳
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Apr 2, 2024
1 parent 4e0147a commit aff481c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ export class Cluster {
})
}
} finally {
if (this.keepAliveInterval) {
clearTimeout(this.keepAliveInterval)
}
this.keepAliveInterval = setTimeout(() => {
void this._keepAlive()
}, ms('1m'))
Expand Down

0 comments on commit aff481c

Please sign in to comment.