js-libp2p icon indicating copy to clipboard operation
js-libp2p copied to clipboard

WebTransport throws NetworkError when creating a new stream on a (very) old connection

Open achingbrain opened this issue 2 years ago • 0 comments

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?

achingbrain avatar Aug 18 '23 13:08 achingbrain