wgengine/magicsock: don't acquire Conn.mu in udpRelayEndpointReady (#16557)

udpRelayEndpointReady used to write into the peerMap, which required
holding Conn.mu, but this changed in f9e7131.

Updates #cleanup

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited 2025-07-14 10:42:56 -07:00 committed by GitHub
parent fe46f33885
commit fc5050048e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,8 +104,6 @@ type endpoint struct {
// be installed as de.bestAddr. It is only called by [relayManager] once it has // be installed as de.bestAddr. It is only called by [relayManager] once it has
// determined maybeBest is functional via [disco.Pong] reception. // determined maybeBest is functional via [disco.Pong] reception.
func (de *endpoint) udpRelayEndpointReady(maybeBest addrQuality) { func (de *endpoint) udpRelayEndpointReady(maybeBest addrQuality) {
de.c.mu.Lock()
defer de.c.mu.Unlock()
de.mu.Lock() de.mu.Lock()
defer de.mu.Unlock() defer de.mu.Unlock()