We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b4958a commit b757099Copy full SHA for b757099
tests/test_tcp.py
@@ -2478,8 +2478,13 @@ def server(sock):
2478
2479
# send close_notify but don't wait for response
2480
sock.setblocking(0)
2481
- with self.assertRaises(ssl.SSLWantReadError):
2482
- sock.unwrap()
+ try:
+ with self.assertRaises(ssl.SSLWantReadError):
2483
+ sock.unwrap()
2484
+ except OSError as ex:
2485
+ # sometimes the network is faster
2486
+ if ex.errno != 0:
2487
+ raise
2488
sock.setblocking(1)
2489
2490
# should receive all data
0 commit comments