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/dist/index.mjs
CHANGED
|
@@ -2827,15 +2827,15 @@ function requireNativePeerConnectionFactory () {
|
|
|
2827
2827
|
const usingRelay = this._selectedLocalCandidate?.type === 'relay' ||
|
|
2828
2828
|
this._selectedRemoteCandidate?.type === 'relay';
|
|
2829
2829
|
|
|
2830
|
-
if (!usingRelay) {
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
}
|
|
2830
|
+
// if (!usingRelay) {
|
|
2831
|
+
// // Tie-breaking: only connect if our port is higher than remote port
|
|
2832
|
+
// // This ensures only one peer connects, avoiding the race condition
|
|
2833
|
+
// // Note: This only works for direct connections (host/srflx)
|
|
2834
|
+
// if (this._localPort < this._remotePort) {
|
|
2835
|
+
// console.log(`[NativePeerConnection] Not connecting (local port ${this._localPort} < remote port ${this._remotePort}), waiting for incoming`);
|
|
2836
|
+
// return;
|
|
2837
|
+
// }
|
|
2838
|
+
// }
|
|
2839
2839
|
|
|
2840
2840
|
console.log(`[NativePeerConnection] Connecting to ${this._remoteAddress}:${this._remotePort}`);
|
|
2841
2841
|
if (usingRelay) {
|