Skip to content

Commit

Permalink
修正socket错误时移出client set
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Jul 14, 2022
1 parent 188fb00 commit d410d88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export class Client extends EventEmitter {
socket.on('error', (err) => {
this.logger.error({err})
this.close(`failed to connect backend: ${err.message}`)
backend.removeClient(this)
})

backend.addClient(this)
Expand Down

0 comments on commit d410d88

Please sign in to comment.