mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22034)
Stopping and restarting a proactor event loop on windows can lead to
spurious errors logged (ConnectionResetError while reading from the
self pipe). This fixes the issue by ensuring that we don't attempt
to start multiple copies of the self-pipe reading loop.
(cherry picked from commit ea5a6363c3
)
Co-authored-by: Ben Darnell <ben@bendarnell.com>
Co-authored-by: Ben Darnell <ben@bendarnell.com>
This commit is contained in:
parent
270e249290
commit
49571c0b0e
5 changed files with 37 additions and 2 deletions
|
@ -737,6 +737,7 @@ class BaseProactorEventLoopTests(test_utils.TestCase):
|
|||
|
||||
def test_loop_self_reading_fut(self):
|
||||
fut = mock.Mock()
|
||||
self.loop._self_reading_future = fut
|
||||
self.loop._loop_self_reading(fut)
|
||||
self.assertTrue(fut.result.called)
|
||||
self.proactor.recv.assert_called_with(self.ssock, 4096)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue