cmd/bootnode: fix timer leak (#27754)

pull/27833/head
ucwong 1 year ago committed by GitHub
parent f404a2d0f1
commit 9d744f0ca8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      cmd/bootnode/main.go

@ -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…
Cancel
Save