Skip to content

Commit

Permalink
Updated error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Mondanzo committed Aug 6, 2024
1 parent fd4a970 commit 22cc80f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/protocol/protocol.server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ export class ProtocolServer extends events.EventEmitter {
})

rl.on('line', line => this.#handleLine(socket, line))
rl.on('error', err => {
this.detach(socket)
log.error("Socket connection abruptly lost!")
})
this.#readers.set(socket, rl)

activeConnectionGauge.inc()
Expand Down

0 comments on commit 22cc80f

Please sign in to comment.