mirror of
https://github.com/fluencelabs/js-libp2p-websockets
synced 2025-04-26 19:32:21 +00:00
fix(dial): pass through errors from pull-ws onConnect
Not passing errors meant that failed websocket connections were being treated as successful dials.
This commit is contained in:
parent
c405f8d1fe
commit
8df8084ec7
@ -24,7 +24,7 @@ class WebSockets {
|
|||||||
log('dialing %s', url)
|
log('dialing %s', url)
|
||||||
const socket = connect(url, {
|
const socket = connect(url, {
|
||||||
binary: true,
|
binary: true,
|
||||||
onConnect: () => callback()
|
onConnect: (err) => callback(err)
|
||||||
})
|
})
|
||||||
|
|
||||||
const conn = new Connection(socket)
|
const conn = new Connection(socket)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user