swifter icon indicating copy to clipboard operation
swifter copied to clipboard

fix(queue): moved socket iteration into queue

Open sim-ceridian opened this issue 2 years ago • 0 comments

We have been experiencing issues with random test failure in Swifter's unit tests. Particularly testStopWithActiveConnections in IOSafetyTests

Swifter Test Failure

We believe this is due to stop() iterating through available sockets while they are potentially mutated by the global queue dispatch in start(). This PR moves the loop over sockets into the private queue to ensure that access is gated. It appears to fix our random failures with unit tests (so far 🤞)

sim-ceridian avatar May 03 '23 02:05 sim-ceridian