Skip to content

Commit 4dddd0f

Browse files
committed
Test
1 parent aa5fb7f commit 4dddd0f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

wgengine/magicsock/magicsock.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,9 @@ func (c *Conn) updateEndpoints(why string) {
629629
}
630630
}
631631
c.endpointsUpdateActive = false
632+
c.logf("goroutinesRunningLocked: broadcasting")
632633
c.muCond.Broadcast()
634+
c.logf("goroutinesRunningLocked: broadcasted")
633635
}()
634636
c.logf("[v1] magicsock: starting endpoint update (%s)", why)
635637
if c.noV4Send.Load() && runtime.GOOS != "js" {
@@ -1402,7 +1404,9 @@ func (c *Conn) derpWriteChanOfAddr(addr netip.AddrPort, peer key.NodePublic) cha
14021404
c.mu.Lock()
14031405
defer c.mu.Unlock()
14041406
close(c.derpStarted)
1407+
c.logf("goroutinesRunningLocked: broadcasting firstDerp")
14051408
c.muCond.Broadcast()
1409+
c.logf("goroutinesRunningLocked: broadcasted firstDerp")
14061410
}()
14071411
}
14081412

@@ -2691,6 +2695,7 @@ func (c *Conn) Close() error {
26912695

26922696
func (c *Conn) goroutinesRunningLocked() bool {
26932697
if c.endpointsUpdateActive {
2698+
c.logf("goroutinesRunningLocked: endpointsUpdateActive returning true")
26942699
return true
26952700
}
26962701
// The goroutine running dc.Connect in derpWriteChanOfAddr may linger
@@ -2706,6 +2711,7 @@ func (c *Conn) goroutinesRunningLocked() bool {
27062711
case <-c.derpStarted:
27072712
break
27082713
default:
2714+
c.logf("goroutinesRunningLocked: derpStarted returning true")
27092715
return true
27102716
}
27112717
}

0 commit comments

Comments
 (0)