@leofcoin/peernet 0.14.17 → 0.14.18
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/browser/peernet.js +5 -5
- package/package.json +1 -1
package/dist/browser/peernet.js
CHANGED
|
@@ -6893,11 +6893,11 @@ class Peer {
|
|
|
6893
6893
|
}})
|
|
6894
6894
|
}
|
|
6895
6895
|
|
|
6896
|
-
|
|
6897
|
-
if (signalinState !== 'stable') return
|
|
6896
|
+
isNotReallyStable(signalinState) {
|
|
6897
|
+
if (signalinState !== 'stable') return true
|
|
6898
6898
|
// remoteDescription & localDescription are null when the connection is just made
|
|
6899
|
-
if (this.#connection.remoteDescription === null && this.#connection.localDescription === null) return
|
|
6900
|
-
return
|
|
6899
|
+
if (this.#connection.remoteDescription === null && this.#connection.localDescription === null) return true
|
|
6900
|
+
return false
|
|
6901
6901
|
}
|
|
6902
6902
|
|
|
6903
6903
|
async _in(message, data) {
|
|
@@ -6913,7 +6913,7 @@ class Peer {
|
|
|
6913
6913
|
this.remoteProtocol = message.candidate.protocol
|
|
6914
6914
|
this.remoteIpFamily = this.remoteAddress?.includes('::') ? 'ipv6': 'ipv4'
|
|
6915
6915
|
const signalinState = this.#connection.signalinState
|
|
6916
|
-
if (signalinState !== 'closed' && this.
|
|
6916
|
+
if (signalinState !== 'closed' && this.isNotReallyStable(signalinState)) return this.#connection.addIceCandidate(new wrtc.RTCIceCandidate(message.candidate));
|
|
6917
6917
|
}
|
|
6918
6918
|
try {
|
|
6919
6919
|
if (message.sdp) {
|