mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-04-26 21:52:22 +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')
|
conn.emit('timeout')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
socket.once('error', (err) => {
|
||||||
|
callback(err)
|
||||||
|
})
|
||||||
|
|
||||||
socket.on('connect', () => {
|
socket.on('connect', () => {
|
||||||
callback(null, conn)
|
callback(null, conn)
|
||||||
conn.emit('connect')
|
conn.emit('connect')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user