Skip to content

Commit ada26c4

Browse files
committed
Change comment to indicate the bug
1 parent ac95eea commit ada26c4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

p2p/host/autonat/autonat.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,9 @@ func (as *AmbientAutoNAT) background() {
174174
defer as.subscriber.Close()
175175
defer as.emitReachabilityChanged.Close()
176176

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)
177+
// Fallback timer to update address in case EvtLocalAddressesUpdated is not emitted.
178+
// TODO: The event not emitting properly is a bug. This is a workaround.
179+
addrChangeTicker := time.NewTicker(30 * time.Minute)
181180
defer addrChangeTicker.Stop()
182181

183182
timer := time.NewTimer(delay)

0 commit comments

Comments
 (0)