node-rtc-connection 1.0.8 → 1.0.9
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 +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/NativePeerConnectionFactory.js +9 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-rtc-connection",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
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",
|
|
@@ -519,15 +519,15 @@ class NativePeerConnection extends EventEmitter {
|
|
|
519
519
|
const usingRelay = this._selectedLocalCandidate?.type === 'relay' ||
|
|
520
520
|
this._selectedRemoteCandidate?.type === 'relay';
|
|
521
521
|
|
|
522
|
-
if (!usingRelay) {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}
|
|
522
|
+
// if (!usingRelay) {
|
|
523
|
+
// // Tie-breaking: only connect if our port is higher than remote port
|
|
524
|
+
// // This ensures only one peer connects, avoiding the race condition
|
|
525
|
+
// // Note: This only works for direct connections (host/srflx)
|
|
526
|
+
// if (this._localPort < this._remotePort) {
|
|
527
|
+
// console.log(`[NativePeerConnection] Not connecting (local port ${this._localPort} < remote port ${this._remotePort}), waiting for incoming`);
|
|
528
|
+
// return;
|
|
529
|
+
// }
|
|
530
|
+
// }
|
|
531
531
|
|
|
532
532
|
console.log(`[NativePeerConnection] Connecting to ${this._remoteAddress}:${this._remotePort}`);
|
|
533
533
|
if (usingRelay) {
|