Files
Brad Fitzpatrick 2be07a36d6 wgengine/netstack: fix data race on shutdown (seen in TestTCPForwardLimits_PerClient)
Wait for the inject func to be done when closing the netstack.Impl.

This sleep made it more flaky (racy) under flakestress for testing before & after:

    ns.packetsInFlight[tei] = struct{}{}
    ns.mu.Unlock()

    time.Sleep(10 * time.Millisecond)
    if debugNetstack() {
        ns.logf("[v2] netstack: in-flight connections for client %v: %d", remoteIP, inFlight)
    }

TestTCPForwardLimits_PerClient is no longer flaky.

Fixes #19720

Change-Id: Ib96618de4867aeadb57f2c4168676a3e966a38c1
Signed-off-by: Brad Fitzpatrick <[email protected]>
2026-05-13 05:00:22 +00:00
..