Skip to content

Commit

Permalink
keep alive成功也给日志
Browse files Browse the repository at this point in the history
enable失败就退出
  • Loading branch information
bangbang93 committed May 25, 2021
1 parent b3581de commit 84ed23d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,11 @@ export class Cluster {
console.log('connected')
try {
await this._enable()
this.isEnabled = true
} catch (e) {
console.error(e)
process.exit(1)
}
this.isEnabled = true
})
this.io.on('message', (msg) => console.log(msg))
this.io.on('disconnect', (reason: string) => {
Expand Down Expand Up @@ -222,6 +223,8 @@ export class Cluster {
if (!status) {
console.log('kicked by server')
process.exit(1)
} else {
console.log('keep alive success')
}
this.keepAliveError = 0
} catch (e) {
Expand Down

0 comments on commit 84ed23d

Please sign in to comment.