apple / swift-nio

Event-driven network application framework for high performance protocol servers & clients, non-blocking.
https://swiftpackageindex.com/apple/swift-nio/documentation
Apache License 2.0
7.85k stars 633 forks source link

Fix race in TCPThroughputBenchmark #2724

Closed ser-0xff closed 1 month ago

ser-0xff commented 1 month ago

Fix race in TCPThroughputBenchmark

Motivation:

Fix for https://github.com/apple/swift-nio/issues/2649

Modifications:

Start test after server handler got channelActive to avoid race. I was not able to reproduce the crash locally but obviously there is a problem and the PR should fix it.

Result:

Performance test will not crash.