peer-pad-core
peer-pad-core copied to clipboard
Handle IPFS init error if ws-star.discovery.libp2p.io connection fails
Just saw a peer-pad init fail with an error when it couldn't connect to wss://ws-star.discovery.libp2p.io
creating IPFS
WebSocket connection to 'wss://ws-star.discovery.libp2p.io/socket.io/?EIO=3&transport=websocket' failed: WebSocket is closed before the connection is established.
main.bundle.js:1 Error: websocket error
at h.o.onError (0.d0c8a7cc.chunk.js:1)
at WebSocket.ws.onerror (0.d0c8a7cc.chunk.js:1)
at h.doClose (0.d0c8a7cc.chunk.js:1)
...
We could try again, remove ws-star from the config and try again, or just alert the user. Ideally we'd try n
times with some backoff, and eventually let the user know that there is a problem finding peers, but we're retrying.