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

Commit

Permalink
Merge pull request #49 from little-bear-labs/ckousik/fix-handshake
Browse files Browse the repository at this point in the history
fix handshake channel
  • Loading branch information
ckousik authored Oct 17, 2022
2 parents 2b41b7f + cad0263 commit 764c930
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 764c930

Please sign in to comment.