mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-04 20:12:16 +02:00
magicsock: fix deadlock in SetStaticEndpoints (#17247)
updates tailscale/corp#32600 A localAPI/cli call to reload-config can end up leaving magicsock's mutex locked. We were missing an unlock for the early exit where there's no change in the static endpoints when the disk-based config is loaded. This is not likely the root cause of the linked issue - just noted during investigation. Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
This commit is contained in:
parent
1791f87870
commit
4af15a1148
@ -1015,6 +1015,7 @@ func (c *Conn) setEndpoints(endpoints []tailcfg.Endpoint) (changed bool) {
|
|||||||
func (c *Conn) SetStaticEndpoints(ep views.Slice[netip.AddrPort]) {
|
func (c *Conn) SetStaticEndpoints(ep views.Slice[netip.AddrPort]) {
|
||||||
c.mu.Lock()
|
c.mu.Lock()
|
||||||
if reflect.DeepEqual(c.staticEndpoints.AsSlice(), ep.AsSlice()) {
|
if reflect.DeepEqual(c.staticEndpoints.AsSlice(), ep.AsSlice()) {
|
||||||
|
c.mu.Unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
c.staticEndpoints = ep
|
c.staticEndpoints = ep
|
||||||
|
Loading…
x
Reference in New Issue
Block a user