Skip to content

Commit f09bef8

Browse files
authored
fix: partial revert of #3076 - do not close handshake channel (#3083)
Removes the closing of the handshake datachannel after the connection has been opened because it breaks compatibility with rust-libp2p 53. This can be revisited after libp2p/rust-libp2p#5986 is resolved.
1 parent 3833353 commit f09bef8

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

.github/workflows/main.yml

-2
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ jobs:
233233
- uses: libp2p/test-plans/.github/actions/run-transport-interop-test@master
234234
with:
235235
test-filter: js-libp2p-head
236-
# remove after https://github.com/libp2p/rust-libp2p/issues/5986 is fixed
237-
test-ignore: rust-v0.53
238236
extra-versions: ${{ github.workspace }}/interop/node-version.json ${{ github.workspace }}/interop/chromium-version.json ${{ github.workspace }}/interop/firefox-version.json ${{ github.workspace }}/interop/webkit-version.json
239237
s3-cache-bucket: ${{ vars.S3_LIBP2P_BUILD_CACHE_BUCKET_NAME }}
240238
s3-access-key-id: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_ACCESS_KEY_ID }}

packages/transport-webrtc/src/private-to-public/utils/connect.ts

-3
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,6 @@ export async function connect (peerConnection: DirectRTCPeerConnection, ufrag: s
166166
signal: options.signal
167167
})
168168

169-
options.log.trace('%s closing handshake datachannel', options.role)
170-
handshakeDataChannel.close()
171-
172169
options.log.trace('%s upgrade outbound', options.role)
173170
return await options.upgrader.upgradeOutbound(maConn, {
174171
skipProtection: true,

packages/transport-webrtc/src/stream.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export class WebRTCStream extends AbstractStream {
350350
// flags can be sent while we or the remote are closing the datachannel so
351351
// if the channel isn't open, don't try to send it but return false to let
352352
// the caller know and act if they need to
353-
this.log.trace('not sending flag %s because channel is "%s" and not "open"', this.channel.readyState, flag.toString())
353+
this.log.trace('not sending flag %s because channel is "%s" and not "open"', flag.toString(), this.channel.readyState)
354354
return false
355355
}
356356

0 commit comments

Comments
 (0)