Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Commit

Permalink
fix: handle error in protocol handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
dryajov authored and Jacob Heun committed Jul 16, 2018
1 parent 19d99d3 commit c18e0bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dial.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,12 @@ class Dialer {
}

selectSafe(msDialer, this.protocol, (err, _conn) => {
if (err) {
log(`could not perform protocol handshake: `, err)
return callback(err)
}
const conn = observeConnection(null, this.protocol, _conn, this.switch.observer)
callback(err, conn)
callback(null, conn)
}, callback)
}, callback)
}
Expand Down

0 comments on commit c18e0bd

Please sign in to comment.