libp2p / js-libp2p

The JavaScript Implementation of libp2p networking stack.
https://libp2p.io
Other
2.26k stars 436 forks source link

fix: catch unhandled promise rejection in WebTransport muxer #2566

Closed achingbrain closed 1 month ago

achingbrain commented 1 month ago

If the WebTransport session has closed, trying to read new stream can cause the promise to reject, printing an error in the console.

This is non-fatal for browsers but let's catch and log the error instead.

Change checklist