Skip to content

Commit

Permalink
修正disable重启错误
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Jul 21, 2021
1 parent 1a541d1 commit e527145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ export class Cluster {

public async disable(): Promise<void> {
return new Promise((resolve, reject) => {
this.io.emit('disable', null, (ack) => {
this.io.emit('disable', null, ([err, ack]) => {
this.isEnabled = false
if (ack !== true) return reject(ack)
if (err || ack !== true) return reject(err || ack)
this.io.disconnect()
resolve()
})
Expand Down

0 comments on commit e527145

Please sign in to comment.