mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
cmd/bootnode: fix timer leak (#27754)
This commit is contained in:
parent
f404a2d0f1
commit
9d744f0ca8
1 changed files with 1 additions and 0 deletions
|
|
@ -197,6 +197,7 @@ func doPortMapping(natm nat.Interface, ln *enode.LocalNode, addr *net.UDPAddr) *
|
|||
// Refresh the mapping periodically.
|
||||
go func() {
|
||||
refresh := time.NewTimer(mapTimeout)
|
||||
defer refresh.Stop()
|
||||
for range refresh.C {
|
||||
addMapping()
|
||||
refresh.Reset(mapTimeout)
|
||||
|
|
|
|||
Loading…
Reference in a new issue