From a6e7844c8d9e9e018815aa5319853d2214ae7a41 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 9 Apr 2025 00:08:13 +0200 Subject: [PATCH] Update server_nat.go --- p2p/server_nat.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/p2p/server_nat.go b/p2p/server_nat.go index 3cf14a8b18..bfc74861d2 100644 --- a/p2p/server_nat.go +++ b/p2p/server_nat.go @@ -164,7 +164,7 @@ func (srv *Server) portMappingLoop() { // larger than the retry interval, this does not mean we lost our existing // mapping. We do not reset the external port, as it is still our best chance, // but we do retry soon. - // TODO: we could check the error code, but again, UPnP implementations are buggy. + // We could check the error code, but again, UPnP implementations are buggy. log.Debug("Couldn't refresh port mapping", "err", err) m.retries++ if m.retries > maxRetries { @@ -175,7 +175,8 @@ func (srv *Server) portMappingLoop() { } } m.nextTime = srv.clock.Now().Add(portMapRetryInterval) - continue //TODO: this means we never reset the ENR. Is that what we want? + // Note ENR is not updated here, i.e. we keep the last port. + continue } // It was mapped!