You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: WebRTC transport unhandled promise rejection during connect (#2299)
Fixes a crash in node where the abort signal passed into a WebRTC
private to private dial would cause an unhandled promise rejection:
```
file:///Users/alex/Documents/Workspaces/ipfs/helia-http-gateway/node_modules/@libp2p/webrtc/dist/src/private-to-private/initiate-connection.js:42
connectedPromise.reject(new CodeError('SDP handshake aborted', 'ERR_SDP_HANDSHAKE_ABORTED'));
^
CodeError: SDP handshake aborted
at EventTarget.sdpAbortedListener (file:///Users/alex/Documents/Workspaces/ipfs/helia-http-gateway/node_modules/@libp2p/webrtc/dist/src/private-to-private/initiate-connection.js:42:37)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:807:20)
at EventTarget.dispatchEvent (node:internal/event_target:742:26)
at abortSignal (node:internal/abort_controller:369:10)
at AbortController.abort (node:internal/abort_controller:391:5)
at EventTarget.onAbort (file:///Users/alex/Documents/Workspaces/ipfs/helia-http-gateway/node_modules/any-signal/dist/src/index.js:8:20)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:807:20)
at EventTarget.dispatchEvent (node:internal/event_target:742:26)
at abortSignal (node:internal/abort_controller:369:10)
at AbortController.abort (node:internal/abort_controller:391:5) {
code: 'ERR_SDP_HANDSHAKE_ABORTED',
props: {}
}
Node.js v20.8.0
```
Simplifies the connection logic to just use the abort signal to
abort the dial instead of the abort signal and multiple deferred
promises.
---------
Co-authored-by: Chad Nehemiah <chad.nehemiah94@gmail.com>
0 commit comments