node-rtc-connection 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/peerconnection/RTCPeerConnection.js +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-rtc-connection",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "WebRTC DataChannel implementation for Node.js with STUN, TURN, NAT traversal, and encryption. Pure Node.js, no native dependencies.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -616,10 +616,11 @@ class RTCPeerConnection extends EventEmitter {
|
|
|
616
616
|
if (this._sctpTransport.state === 'connected') {
|
|
617
617
|
for (const channel of this._dataChannels.values()) {
|
|
618
618
|
if (channel.readyState === 'connecting') {
|
|
619
|
-
channel
|
|
620
|
-
|
|
621
|
-
// Hook up channel to network transport
|
|
619
|
+
// Hook up channel to network transport first
|
|
622
620
|
this._connectChannelToNetwork(channel);
|
|
621
|
+
|
|
622
|
+
// Then set state to open (emits 'open' event)
|
|
623
|
+
channel._setStateToOpen();
|
|
623
624
|
}
|
|
624
625
|
}
|
|
625
626
|
}
|