]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Fix a race condition in trio quic shutdown.
authorBob Halley <halley@dnspython.org>
Fri, 27 Oct 2023 15:55:10 +0000 (08:55 -0700)
committerBob Halley <halley@dnspython.org>
Fri, 27 Oct 2023 15:55:10 +0000 (08:55 -0700)
commit277ee25d7c8851d2c2cd1e683cfd86e786ba9317
treed7ef3273b75b55988bd90da27b4818f8af4a5826
parentcb83902c21f6a938b53c403d7445a2b0a473c0e7
Fix a race condition in trio quic shutdown.

It was possible to have a "lost wakeup" situation where we had stuff to
send but the trio worker was blocked indefinitely in the receive.

There is no test for this as the race is very race-y and I can't reproduce it
reliably in the test suite, though I was able to do reliable replication a different
way when debugging.

I also reordered event processing to happen after timer handling but before sending
in the trio and sync quic code.  The async code already worked this way due to its
different struture and needed no changes.
dns/quic/_sync.py
dns/quic/_trio.py