We have been experiencing issues with random test failure in Swifter's unit tests. Particularly testStopWithActiveConnections in IOSafetyTests
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 🤞)
We have been experiencing issues with random test failure in Swifter's unit tests. Particularly
testStopWithActiveConnections
inIOSafetyTests
We believe this is due to
stop()
iterating through availablesockets
while they are potentially mutated by the global queue dispatch instart()
. This PR moves the loop oversockets
into the private queue to ensure that access is gated. It appears to fix our random failures with unit tests (so far 🤞)