mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-06-11 10:31:20 +00:00
pass the err on the callback too
This commit is contained in:
@ -38,6 +38,10 @@ function TCP () {
|
||||
conn.emit('timeout')
|
||||
})
|
||||
|
||||
socket.once('error', (err) => {
|
||||
callback(err)
|
||||
})
|
||||
|
||||
socket.on('connect', () => {
|
||||
callback(null, conn)
|
||||
conn.emit('connect')
|
||||
|
Reference in New Issue
Block a user