@yz-social/webrtc 0.0.4 → 0.0.5
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/lib/webrtc.js +1 -0
- package/package.json +1 -1
package/lib/webrtc.js
CHANGED
|
@@ -16,6 +16,7 @@ export class WebRTC extends WebRTCBase {
|
|
|
16
16
|
|
|
17
17
|
const returning = await responder(this.signals); // this.signals might be an empty list.
|
|
18
18
|
if (!returning?.length) return;
|
|
19
|
+
if (this.peer.iceGatheringState !== 'gathering') return; // All done.
|
|
19
20
|
this.signals = returning;
|
|
20
21
|
await this.connectVia(responder); // Keep "long-polling" the other side until it has nothing left to say.
|
|
21
22
|
}
|