Avoid writes after lost connection#831
Conversation
When the socket connection is lost, "asyncio.selector_events" doesn't raise an exception, but logs warning level when attempting to write to a lost connection past certain threshold. To avoid spurious writes and logs, write only once to allow "QubesDaemonProtocol.connection_lost()" to be called early. Prior to this change, "connection_lost()" was called only after many writes. Fixes: QubesOS/qubes-issues#10923
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #831 +/- ##
==========================================
- Coverage 70.42% 70.37% -0.05%
==========================================
Files 61 61
Lines 14128 14132 +4
==========================================
- Hits 9950 9946 -4
- Misses 4178 4186 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026070101-devel&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026050504-devel&flavor=update
Failed tests32 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/176874#dependencies 16 fixed
Unstable testsDetails
Performance TestsPerformance degradation:31 performance degradations
Remaining performance tests:80 tests
|
When the socket connection is lost, "asyncio.selector_events" doesn't raise an exception, but logs warning level when attempting to write to a lost connection past certain threshold. To avoid spurious writes and logs, write only once to allow "QubesDaemonProtocol.connection_lost()" to be called early.
Prior to this change, "connection_lost()" was called only after many writes.
Fixes: QubesOS/qubes-issues#10923