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.
@@ -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 {
