js-libp2p
js-libp2p copied to clipboard
WebTransport throws NetworkError when creating a new stream on a (very) old connection
I opened a WebTransport connection to a peer, closed my laptop and forgot about it.
The next day I opened my laptop, the node still thinks it has a connection, connection.newStream() calls .createBidirectionalStream() on the WebTransport object which throws DOMException: Failed to execute 'createBidirectionalStream' on 'WebTransport': No connection..
We should handle this error. Probably abort the connection with the error?