mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 13:05:46 +00:00
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>
This commit is contained in:
parent
f09ede9243
commit
44d71d1e42
@ -2819,7 +2819,7 @@ func (c *Conn) ParseEndpoint(endpointStr string) (conn.Endpoint, error) {
|
|||||||
c.mu.Lock()
|
c.mu.Lock()
|
||||||
defer c.mu.Unlock()
|
defer c.mu.Unlock()
|
||||||
if c.closed {
|
if c.closed {
|
||||||
return nil, errors.New("magicsock: Conn closed")
|
return nil, errConnClosed
|
||||||
}
|
}
|
||||||
node, ok := c.peerMap.nodeForNodeKey(tailcfg.NodeKey(pk))
|
node, ok := c.peerMap.nodeForNodeKey(tailcfg.NodeKey(pk))
|
||||||
if !ok {
|
if !ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user