mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
test_ssl: Implement timeout in ssl_io_loop() (#3500)
The timeout parameter was not used.
This commit is contained in:
parent
834a5cecac
commit
50a72af657
1 changed files with 3 additions and 0 deletions
|
|
@ -1708,8 +1708,11 @@ class SimpleBackgroundTests(unittest.TestCase):
|
|||
# A simple IO loop. Call func(*args) depending on the error we get
|
||||
# (WANT_READ or WANT_WRITE) move data between the socket and the BIOs.
|
||||
timeout = kwargs.get('timeout', 10)
|
||||
deadline = time.monotonic() + timeout
|
||||
count = 0
|
||||
while True:
|
||||
if time.monotonic() > deadline:
|
||||
self.fail("timeout")
|
||||
errno = None
|
||||
count += 1
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue