We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to create 2 datachannels in a row fails with an error.
var wrtc = require('electron-webrtc')() var pc = new wrtc.RTCPeerConnection({}) pc.createDataChannel('label1', {}) pc.createDataChannel('label2', {})
Error: Error evaluating " var pc = conns["0"] var dc = pc.dataChannels[65535] var id = 'dc:' + "0" + ':' + dc.id dc.onopen = function () { send(id, { type: 'open', state: { ordered: dc.ordered, protocol: dc.protocol, maxPacketLifeType: dc.maxPacketLifeType, maxRetransmits: dc.maxRetransmits, negotiated: dc.negotiated, reliable: dc.reliable } }) } dc.onmessage = function (e) { send(id, { type: 'message', event: { data: e.data instanceof ArrayBuffer ? arrayBufferToBase64(e.data) : e.data, origin: e.origin }, dataType: e.data instanceof ArrayBuffer ? 'binary' : 'string' }) } dc.onbufferedamountlow = function () { send(id, { type: 'bufferedamountlow' }) } dc.onclose = function () { delete pc.dataChannels[dc.id] send(id, { type: 'close' }) } dc.onerror = function () { send(id, { type: 'error' }) } if (dc.readyState === 'open') dc.onopen() for (var i = 0; i < dc.msgQueue.length; i++) { dc.onmessage(dc.msgQueue[i]) } dc.msgQueue = null " in "window": Cannot read property 'length' of null at Daemon.<anonymous> (/Users/Mullen/Desktop/Projects/Web/Working/simple-peer/node_modules/electron-eval/lib/index.js:81:21) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:116:13) at Daemon.emit (events.js:211:7)
The text was updated successfully, but these errors were encountered:
dc.id is always 65535, which is leading to a conflict.
dc.id
65535
Sorry, something went wrong.
It looks like the non-uniqueness of ids is normal. (Happens in Chrome and Firefox too).
Since they aren't unique, using them for the pc._dataChannels map is incorrect.
No branches or pull requests
Trying to create 2 datachannels in a row fails with an error.
The text was updated successfully, but these errors were encountered: