Files
Brad Fitzpatrick 283569e707 derp/derpserver: fix data race on sclient.keepAliveTimer
run assigned keepAliveTimer after AfterFunc had already armed it, and
the timer's func uses the field (writePending resets it), so nothing
ordered the assignment before the first keepalive. Assign it first and
arm it with Reset, which does.

No existing test ran long enough for a keepalive to fire. The new
TestKeepAlive waits for three under synctest; with the race detector it
fails without this fix.

Updates #13038

Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: I8f2c4e6a1b3d5f7091a2c3e4d5f6a7b8c9d0e1f2
2026-11-13 15:03:21 -08:00
..