diff options
| author | tv <tv@krebsco.de> | 2026-11-01 23:08:48 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-01 23:08:48 +0100 |
| commit | 6913ffaab44fdf6741398f138ca62f6859153a72 (patch) | |
| tree | 3f1fee280e7312ec82c69b59c655957a126a1976 /src/transport/libp2p/driver.rs | |
| parent | b757b030012eec13d689292df593c1608a90b11f (diff) | |
probe when reachable
Diffstat (limited to 'src/transport/libp2p/driver.rs')
| -rw-r--r-- | src/transport/libp2p/driver.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/transport/libp2p/driver.rs b/src/transport/libp2p/driver.rs index 39a2a5d..6ef04e7 100644 --- a/src/transport/libp2p/driver.rs +++ b/src/transport/libp2p/driver.rs @@ -420,6 +420,10 @@ pub(super) async fn run( book.failed_relays.remove(&relay_peer_id); if !renewal { book.counts.slots_granted += 1; + // Peers that couldn't reach us may now, through it. + if let Some(reachable) = &book.reachable { + reachable.notify_one(); + } } } if !renewal { @@ -440,6 +444,12 @@ pub(super) async fn run( (Reachability::Public, Some(address.clone())) } }; + if matches!(new, NatStatus::Public(_)) + && !matches!(old, NatStatus::Public(_)) + && let Some(reachable) = &book.reachable + { + reachable.notify_one(); + } } nat = new; } |
