fix self holepunch
This commit is contained in:
parent
a09c1c3d79
commit
e874bf142d
1 changed files with 21 additions and 15 deletions
|
|
@ -236,6 +236,9 @@ impl ExtendedMatchmakeSession {
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
for pid in &list_of_connected_pids {
|
for pid in &list_of_connected_pids {
|
||||||
|
if other_conn.pid == *pid {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
other_conn
|
other_conn
|
||||||
.remote
|
.remote
|
||||||
.process_notification_event(NotificationEvent {
|
.process_notification_event(NotificationEvent {
|
||||||
|
|
@ -254,10 +257,13 @@ impl ExtendedMatchmakeSession {
|
||||||
let Some(old_conns) = old_conns.upgrade() else {
|
let Some(old_conns) = old_conns.upgrade() else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
if old_conns.pid != self.session.gathering.host_pid{
|
if old_conns.pid != self.session.gathering.host_pid {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for new_conn_pid in conns.iter().filter_map(Weak::upgrade).map(|c| c.pid) {
|
||||||
|
if old_conns.pid == new_conn_pid {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for new_conn_pid in conns.iter().filter_map(Weak::upgrade).map(|c| c.pid){
|
|
||||||
old_conns
|
old_conns
|
||||||
.remote
|
.remote
|
||||||
.process_notification_event(NotificationEvent {
|
.process_notification_event(NotificationEvent {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue