wgengine/magicsock: ignore close races even harder.

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/2750/head
David Anderson 3 years ago committed by Dave Anderson
parent 8bacfe6a37
commit 86d1c4eceb

@ -289,16 +289,12 @@ func meshStacks(logf logger.Logf, mutateNetmap func(idx int, nm *netmap.NetworkM
m.conn.UpdatePeers(peerSet)
wg, err := nmcfg.WGCfg(nm, logf, netmap.AllowSingleHosts, "")
if err != nil {
if ctx.Err() != nil {
// shutdown race, don't care.
return
}
// We're too far from the *testing.T to be graceful,
// blow up. Shouldn't happen anyway.
panic(fmt.Sprintf("failed to construct wgcfg from netmap: %v", err))
}
if err := m.Reconfig(wg); err != nil {
if ctx.Err() != nil {
if ctx.Err() != nil || errors.Is(err, errConnClosed) {
// shutdown race, don't care.
return
}

Loading…
Cancel
Save