mirror of
https://github.com/fluencelabs/js-libp2p-websockets
synced 2025-04-25 13:52:35 +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)
|
||||
const socket = connect(url, {
|
||||
binary: true,
|
||||
onConnect: () => callback()
|
||||
onConnect: (err) => callback(err)
|
||||
})
|
||||
|
||||
const conn = new Connection(socket)
|
||||
|
Loading…
x
Reference in New Issue
Block a user