wgengine/magicsock: fix race in test shutdown, again.
We were returning an error almost, but not quite like errConnClosed in a single codepath, which could still trip the panic on reconfig in the test logic. Signed-off-by: David Anderson <danderson@tailscale.com>pull/2745/head
parent
f09ede9243
commit
44d71d1e42
|
@ -2819,7 +2819,7 @@ func (c *Conn) ParseEndpoint(endpointStr string) (conn.Endpoint, error) {
|
|||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
if c.closed {
|
||||
return nil, errors.New("magicsock: Conn closed")
|
||||
return nil, errConnClosed
|
||||
}
|
||||
node, ok := c.peerMap.nodeForNodeKey(tailcfg.NodeKey(pk))
|
||||
if !ok {
|
||||
|
|
Loading…
Reference in New Issue