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

Commit c18e0bd

Browse files
dryajovJacob Heun
authored andcommitted
fix: handle error in protocol handshake
1 parent 19d99d3 commit c18e0bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/dial.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,12 @@ class Dialer {
409409
}
410410

411411
selectSafe(msDialer, this.protocol, (err, _conn) => {
412+
if (err) {
413+
log(`could not perform protocol handshake: `, err)
414+
return callback(err)
415+
}
412416
const conn = observeConnection(null, this.protocol, _conn, this.switch.observer)
413-
callback(err, conn)
417+
callback(null, conn)
414418
}, callback)
415419
}, callback)
416420
}

0 commit comments

Comments
 (0)