summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/windows_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/windows_events.py')
-rw-r--r--Lib/asyncio/windows_events.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index 890fce8..f91fcdd 100644
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -425,7 +425,8 @@ class IocpProactor:
try:
return ov.getresult()
except OSError as exc:
- if exc.winerror == _overlapped.ERROR_NETNAME_DELETED:
+ if exc.winerror in (_overlapped.ERROR_NETNAME_DELETED,
+ _overlapped.ERROR_OPERATION_ABORTED):
raise ConnectionResetError(*exc.args)
else:
raise
@@ -447,7 +448,8 @@ class IocpProactor:
try:
return ov.getresult()
except OSError as exc:
- if exc.winerror == _overlapped.ERROR_NETNAME_DELETED:
+ if exc.winerror in (_overlapped.ERROR_NETNAME_DELETED,
+ _overlapped.ERROR_OPERATION_ABORTED):
raise ConnectionResetError(*exc.args)
else:
raise
@@ -466,7 +468,8 @@ class IocpProactor:
try:
return ov.getresult()
except OSError as exc:
- if exc.winerror == _overlapped.ERROR_NETNAME_DELETED:
+ if exc.winerror in (_overlapped.ERROR_NETNAME_DELETED,
+ _overlapped.ERROR_OPERATION_ABORTED):
raise ConnectionResetError(*exc.args)
else:
raise