diff options
author | Ken Jin <kenjin@python.org> | 2022-10-27 02:37:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-27 02:37:12 (GMT) |
commit | 8a755423eba8e19704d96905730cf7f50083eb23 (patch) | |
tree | ee00b4687f16878c550d1feec0642054014e7901 /Lib | |
parent | 7b24333fff51f9ca36ef19748016cc2b39ab6301 (diff) | |
download | cpython-8a755423eba8e19704d96905730cf7f50083eb23.zip cpython-8a755423eba8e19704d96905730cf7f50083eb23.tar.gz cpython-8a755423eba8e19704d96905730cf7f50083eb23.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>
Diffstat (limited to 'Lib')
-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 2685a33..c6aab40 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: |