diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-10-27 03:03:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-27 03:03:58 (GMT) |
commit | bb80f6ad92f6765cdcd9c887c389ea37103e6902 (patch) | |
tree | 67045965241eb58b8eab6d83ef227330448b5d92 /Lib/asyncio | |
parent | 5074c35c2a5659e74cd7a0e925a0d7e493ea28e1 (diff) | |
download | cpython-bb80f6ad92f6765cdcd9c887c389ea37103e6902.zip cpython-bb80f6ad92f6765cdcd9c887c389ea37103e6902.tar.gz cpython-bb80f6ad92f6765cdcd9c887c389ea37103e6902.tar.bz2 |
gh-98703: Fix asyncio proactor_events calling _call_connection_lost multiple times (GH-98704)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 8a755423eba8e19704d96905730cf7f50083eb23)
Co-authored-by: Ken Jin <kenjin@python.org>
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/proactor_events.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py index 610d673..0916d9e 100644 --- a/Lib/asyncio/proactor_events.py +++ b/Lib/asyncio/proactor_events.py @@ -152,6 +152,8 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin, self._loop.call_soon(self._call_connection_lost, exc) def _call_connection_lost(self, exc): + if self._called_connection_lost: + return try: self._protocol.connection_lost(exc) finally: |