wgengine/magicsock: fix relayManager deadlock (#17449)
Updates tailscale/corp#32978 Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
@@ -758,7 +758,10 @@ func (r *relayManager) handleNewServerEndpointRunLoop(newServerEndpoint newRelay
|
||||
ctx: ctx,
|
||||
cancel: cancel,
|
||||
}
|
||||
if byServerDisco == nil {
|
||||
// We must look up byServerDisco again. The previous value may have been
|
||||
// deleted from the outer map when cleaning up duplicate work.
|
||||
byServerDisco, ok = r.handshakeWorkByServerDiscoByEndpoint[newServerEndpoint.wlb.ep]
|
||||
if !ok {
|
||||
byServerDisco = make(map[key.DiscoPublic]*relayHandshakeWork)
|
||||
r.handshakeWorkByServerDiscoByEndpoint[newServerEndpoint.wlb.ep] = byServerDisco
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user