Repository navigation
Conversation
9bcb917 to
335f30f
Compare
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
jamesconwaydev
left a comment
There was a problem hiding this comment.
The reasoning holds. With one reused sender, the writes that pile up are charged to that socket's own send buffer, so it can block on its own sk_sndbuf while the receiver still has room. The READY=1 from a fresh socket then goes straight through. Dialing per datagram, as sendSystemdNotification does, fills the receiver's queue itself, so the final send is tested against the condition the test is named for.
One small thing: the fill loop has no bound. If the queue never fills, say on a platform that drops instead of blocking, the first select fails the test after 5 s, but the goroutine keeps dialing until the test binary exits. It can also be left blocked on the second done <-. A cap on the loop, a few thousand sends, would keep a failure from turning into a spin.
I read this against main's app/systemd_linux.go (100 ms systemdNotifyTimeout); I didn't run it.
Signed-off-by: Christoph Maser <christoph.maser+github@gmail.com>
335f30f to
7ea2df1
Compare
Pull Request Checklist
Please check all the applicable boxes.
benchstatto compare benchmarksWhich user-facing changes does this PR introduce?