Update server_nat.go

This commit is contained in:
Felix Lange 2025-04-09 00:09:04 +02:00 committed by GitHub
parent a6e7844c8d
commit 8edf5ee3c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -160,11 +160,11 @@ func (srv *Server) portMappingLoop() {
if m.extPort == 0 { if m.extPort == 0 {
log.Debug("Couldn't add port mapping", "err", err) log.Debug("Couldn't add port mapping", "err", err)
} else { } else {
// Failed refresh. Since UPnP implementation are often buggy, and lifetime is // Failed refresh. Since UPnP implementation are often buggy,
// larger than the retry interval, this does not mean we lost our existing // and lifetime is larger than the retry interval, this does not
// mapping. We do not reset the external port, as it is still our best chance, // mean we lost our existing mapping. We do not reset the external
// but we do retry soon. // port, as it is still our best chance, but we do retry soon.
// We could check the error code, but again, UPnP implementations are buggy. // We could check the error code, but UPnP implementations are buggy.
log.Debug("Couldn't refresh port mapping", "err", err) log.Debug("Couldn't refresh port mapping", "err", err)
m.retries++ m.retries++
if m.retries > maxRetries { if m.retries > maxRetries {