We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac95eea commit ada26c4Copy full SHA for ada26c4
p2p/host/autonat/autonat.go
@@ -174,10 +174,9 @@ func (as *AmbientAutoNAT) background() {
174
defer as.subscriber.Close()
175
defer as.emitReachabilityChanged.Close()
176
177
- // We want an update when our public non-relay listen addresses have changed.
178
- // EvtLocalAddressesUpdated is a poor proxy for that. It works when the host is Public,
179
- // but fails when the host is private and used with AutoRelay.
180
- addrChangeTicker := time.NewTicker(1 * time.Minute)
+ // Fallback timer to update address in case EvtLocalAddressesUpdated is not emitted.
+ // TODO: The event not emitting properly is a bug. This is a workaround.
+ addrChangeTicker := time.NewTicker(30 * time.Minute)
181
defer addrChangeTicker.Stop()
182
183
timer := time.NewTimer(delay)
0 commit comments