WebTransport throws NetworkError when creating a new stream on a (very) old connection
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.6k
- Forks
- 546
- Avg merge
- 8h 18m
- Merged PRs (30d)
- 16
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the connection.newStream() entry point and trace its call to WebTransport.createBidirectionalStream(). Reproduce the stale-connection case after the laptop sleeps or disconnects, then determine the expected connection state and error handling; done means the NetworkError is handled consistently rather than escaping from newStream().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100