Skip to content

Commit

Permalink
Merge pull request #179 from mcollina/movehandler
Browse files Browse the repository at this point in the history
moved error handler
  • Loading branch information
mcollina authored Jan 2, 2018
2 parents 9a4eb04 + 033b805 commit 7458255
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ function Client (broker, conn) {
}
this._nextBatch = nextBatch

this.on('error', onError)

nextBatch()

conn.on('readable', nextBatch)
conn.on('error', this.emit.bind(this, 'error'))
this.parser.on('error', this.emit.bind(this, 'error'))

this.on('error', onError)

this._eos = eos(this.conn, this.close.bind(this))

function dedupe (packet) {
Expand Down

0 comments on commit 7458255

Please sign in to comment.