Closed glyph closed 2 weeks ago
Both of the failures are in twisted.internet.test.test_tcp.AbortConnectionTests_CFReactorTests.test_fullWriteBuffer
, which also fails sometimes in the asyncioreactor
too: https://github.com/twisted/twisted/issues/12151
so I think this fix actually resolves the issue
please review
Were you able to reproduce the errors on your local system?
I was not. But in every other case I managed to reproduce the error in CI after a minimum of 5 tries.
The race condition here is extremely subtle, and I couldn't even think of a white-box test to reproduce it, but basically if something were to call _scheduleSimulate
without force
after calling it with force
, so logically I think I see how this hang could happen.
Scope and purpose
Fixes #11771
This is the change that appeared to have made a difference isolated and extracted from #12150 .