bpo-32622: Implement loop.sendfile() (#5271)

This commit is contained in:
Andrew Svetlov 2018-01-27 21:22:47 +02:00 committed by GitHub
parent f13f12d8da
commit 7c684073f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 560 additions and 8 deletions

View file

@ -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