Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

fix handshake channel #49

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class WebRTCTransport implements Transport {

// create data channel
const dataChannelOpenPromise = defer();
const handshakeDataChannel = peerConnection.createDataChannel('data', {negotiated: true, id: 1});
const handshakeDataChannel = peerConnection.createDataChannel('handshake', {negotiated: true, id: 0});
const handhsakeTimeout = setTimeout(() => {
log.error('Data channel never opened. State was: %s', handshakeDataChannel.readyState.toString());
dataChannelOpenPromise.reject(dataChannelError('data', `data channel was never opened: state: ${handshakeDataChannel.readyState}`));
Expand Down