pass the err on the callback too

This commit is contained in:
David Dias 2016-06-23 08:41:54 +01:00
parent ae6a808fc7
commit cba4b8b94a

View File

@ -38,6 +38,10 @@ function TCP () {
conn.emit('timeout')
})
socket.once('error', (err) => {
callback(err)
})
socket.on('connect', () => {
callback(null, conn)
conn.emit('connect')