diff options
author | Ben Darnell <ben@bendarnell.com> | 2020-08-31 15:57:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-31 12:57:52 -0700 |
commit | ea5a6363c3f8cc90b7c0cc573922b10f296073b6 (patch) | |
tree | 9464334a7c5d9f0b5dc76a227b915a9850d05c90 /Lib/test/test_asyncio/test_proactor_events.py | |
parent | c3a651ad2544d7d1be389b63e9a4a58a92a31623 (diff) | |
download | cpython-git-ea5a6363c3f8cc90b7c0cc573922b10f296073b6.tar.gz |
bpo-39010: Fix errors logged on proactor loop restart (#22017)
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.
Diffstat (limited to 'Lib/test/test_asyncio/test_proactor_events.py')
-rw-r--r-- | Lib/test/test_asyncio/test_proactor_events.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_proactor_events.py b/Lib/test/test_asyncio/test_proactor_events.py index d0ab38743e..4c8906d531 100644 --- a/Lib/test/test_asyncio/test_proactor_events.py +++ b/Lib/test/test_asyncio/test_proactor_events.py @@ -753,6 +753,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) |