Skip to content

Commit 9d744f0

Browse files
authored
cmd/bootnode: fix timer leak (#27754)
1 parent f404a2d commit 9d744f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/bootnode/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ func doPortMapping(natm nat.Interface, ln *enode.LocalNode, addr *net.UDPAddr) *
197197
// Refresh the mapping periodically.
198198
go func() {
199199
refresh := time.NewTimer(mapTimeout)
200+
defer refresh.Stop()
200201
for range refresh.C {
201202
addMapping()
202203
refresh.Reset(mapTimeout)

0 commit comments

Comments
 (0)