mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
cmd/derper: fix embarassing bug introduced in earlier refactor
The remove hook implementation was copy/pasted from the line above and I didn't change the body, resulting in packet forwarding routes never being removed. Fortunately we weren't using this path yet, but it led to stats being off, and (very) slow memory growth.
This commit is contained in:
parent
36e9cb948f
commit
3553512a71
@ -39,7 +39,7 @@ func startMeshWithHost(s *derp.Server, host string) error {
|
|||||||
}
|
}
|
||||||
c.MeshKey = s.MeshKey()
|
c.MeshKey = s.MeshKey()
|
||||||
add := func(k key.Public) { s.AddPacketForwarder(k, c) }
|
add := func(k key.Public) { s.AddPacketForwarder(k, c) }
|
||||||
remove := func(k key.Public) { s.AddPacketForwarder(k, c) }
|
remove := func(k key.Public) { s.RemovePacketForwarder(k, c) }
|
||||||
go c.RunWatchConnectionLoop(s.PublicKey(), add, remove)
|
go c.RunWatchConnectionLoop(s.PublicKey(), add, remove)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user