mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] gh-109370: Fix unexpected traceback output in test_concurrent_futures (GH-109780) (GH-109882)
Follow-up of gh-107219.
* Only close the connection writer on Windows.
* Also use existing constant _winapi.ERROR_OPERATION_ABORTED instead of
WSA_OPERATION_ABORTED.
(cherry picked from commit 0b4e090422
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
97f7e9d5d6
commit
8fef834f05
2 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,6 @@ except ImportError:
|
|||
BUFSIZE = 8192
|
||||
# A very generous timeout when it comes to local connections...
|
||||
CONNECTION_TIMEOUT = 20.
|
||||
WSA_OPERATION_ABORTED = 995
|
||||
|
||||
_mmap_counter = itertools.count()
|
||||
|
||||
|
@ -300,7 +299,7 @@ if _winapi:
|
|||
finally:
|
||||
self._send_ov = None
|
||||
nwritten, err = ov.GetOverlappedResult(True)
|
||||
if err == WSA_OPERATION_ABORTED:
|
||||
if err == _winapi.ERROR_OPERATION_ABORTED:
|
||||
# close() was called by another thread while
|
||||
# WaitForMultipleObjects() was waiting for the overlapped
|
||||
# operation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue