@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.
@@ -6893,11 +6893,11 @@ class Peer {
6893
6893
  }})
6894
6894
  }
6895
6895
 
6896
- isReallyStable(signalinState) {
6897
- if (signalinState !== 'stable') return false
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 false
6900
- return true
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.isReallyStable(signalinState)) return this.#connection.addIceCandidate(new wrtc.RTCIceCandidate(message.candidate));
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "0.14.17",
3
+ "version": "0.14.18",
4
4
  "description": "",
5
5
  "source": "src/peernet.js",
6
6
  "main": "dist/commonjs/peernet.js",