mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Fix reconnecting by always accepting new ice candidates
This commit is contained in:
parent
c0e5b66d41
commit
aacf24c31f
1 changed files with 0 additions and 8 deletions
|
@ -1173,12 +1173,9 @@ class RTCPeer extends Peer {
|
||||||
}
|
}
|
||||||
|
|
||||||
_handleLocalCandidate(candidate) {
|
_handleLocalCandidate(candidate) {
|
||||||
if (this.localIceCandidatesSent) return;
|
|
||||||
|
|
||||||
Logger.debug("RTC: Local candidate created", candidate);
|
Logger.debug("RTC: Local candidate created", candidate);
|
||||||
|
|
||||||
if (candidate === null) {
|
if (candidate === null) {
|
||||||
this.localIceCandidatesSent = true;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1186,12 +1183,9 @@ class RTCPeer extends Peer {
|
||||||
}
|
}
|
||||||
|
|
||||||
async _handleRemoteCandidate(candidate) {
|
async _handleRemoteCandidate(candidate) {
|
||||||
if (this.remoteIceCandidatesReceived) return;
|
|
||||||
|
|
||||||
Logger.debug("RTC: Received remote candidate", candidate);
|
Logger.debug("RTC: Received remote candidate", candidate);
|
||||||
|
|
||||||
if (candidate === null) {
|
if (candidate === null) {
|
||||||
this.remoteIceCandidatesReceived = true;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1272,8 +1266,6 @@ class RTCPeer extends Peer {
|
||||||
this._conn.close();
|
this._conn.close();
|
||||||
this._conn = null;
|
this._conn = null;
|
||||||
}
|
}
|
||||||
this.localIceCandidatesSent = false;
|
|
||||||
this.remoteIceCandidatesReceived = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_sendMessage(message) {
|
_sendMessage(message) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue