mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
Update server_nat.go
This commit is contained in:
parent
d984c79585
commit
a6e7844c8d
1 changed files with 3 additions and 2 deletions
|
|
@ -164,7 +164,7 @@ func (srv *Server) portMappingLoop() {
|
||||||
// larger than the retry interval, this does not mean we lost our existing
|
// 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,
|
// mapping. We do not reset the external port, as it is still our best chance,
|
||||||
// but we do retry soon.
|
// 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)
|
log.Debug("Couldn't refresh port mapping", "err", err)
|
||||||
m.retries++
|
m.retries++
|
||||||
if m.retries > maxRetries {
|
if m.retries > maxRetries {
|
||||||
|
|
@ -175,7 +175,8 @@ func (srv *Server) portMappingLoop() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m.nextTime = srv.clock.Now().Add(portMapRetryInterval)
|
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!
|
// It was mapped!
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue