mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-26 03:25:35 +00:00
ipn/localapi: close portmapper after debug
This ensures that any mappings that are created are correctly cleaned up, instead of waiting for them to expire in the router. Updates #7377 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I436248ee7740eded6d8adae5df525e785a8f7ccb
This commit is contained in:
parent
f6cd24499b
commit
045f995203
@ -689,6 +689,8 @@ func (h *Handler) serveDebugPortmap(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
logf("cb: no mapping")
|
logf("cb: no mapping")
|
||||||
})
|
})
|
||||||
|
defer c.Close()
|
||||||
|
|
||||||
linkMon, err := monitor.New(logger.WithPrefix(logf, "monitor: "))
|
linkMon, err := monitor.New(logger.WithPrefix(logf, "monitor: "))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logf("error creating monitor: %v", err)
|
logf("error creating monitor: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user