mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-04-25 13:42:17 +00:00
pass the err on the callback too
This commit is contained in:
parent
ae6a808fc7
commit
cba4b8b94a
@ -38,6 +38,10 @@ function TCP () {
|
||||
conn.emit('timeout')
|
||||
})
|
||||
|
||||
socket.once('error', (err) => {
|
||||
callback(err)
|
||||
})
|
||||
|
||||
socket.on('connect', () => {
|
||||
callback(null, conn)
|
||||
conn.emit('connect')
|
||||
|
Loading…
x
Reference in New Issue
Block a user