File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -511,9 +511,9 @@ async def __await_impl__(self) -> ClientConnection:
511
511
else :
512
512
raise SecurityError (f"more than { MAX_REDIRECTS } redirects" )
513
513
514
- except TimeoutError :
514
+ except TimeoutError as exc :
515
515
# Re-raise exception with an informative error message.
516
- raise TimeoutError ("timed out during handshake" ) from None
516
+ raise TimeoutError ("timed out during opening handshake" ) from exc
517
517
518
518
# ... = yield from connect(...) - remove when dropping Python < 3.10
519
519
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ def handshake(
90
90
self .protocol .send_request (self .request )
91
91
92
92
if not self .response_rcvd .wait (timeout ):
93
- raise TimeoutError ("timed out during handshake" )
93
+ raise TimeoutError ("timed out while waiting for handshake response " )
94
94
95
95
# self.protocol.handshake_exc is set when the connection is lost before
96
96
# receiving a response, when the response cannot be parsed, or when the
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ def handshake(
128
128
129
129
"""
130
130
if not self .request_rcvd .wait (timeout ):
131
- raise TimeoutError ("timed out during handshake" )
131
+ raise TimeoutError ("timed out while waiting for handshake request " )
132
132
133
133
if self .request is not None :
134
134
with self .send_context (expected_state = CONNECTING ):
Original file line number Diff line number Diff line change @@ -396,7 +396,7 @@ async def test_timeout_during_handshake(self):
396
396
self .fail ("did not raise" )
397
397
self .assertEqual (
398
398
str (raised .exception ),
399
- "timed out during handshake" ,
399
+ "timed out during opening handshake" ,
400
400
)
401
401
402
402
async def test_connection_closed_during_handshake (self ):
@@ -641,7 +641,7 @@ async def test_socks_proxy_connection_timeout(self):
641
641
self .fail ("did not raise" )
642
642
self .assertEqual (
643
643
str (raised .exception ),
644
- "timed out during handshake" ,
644
+ "timed out during opening handshake" ,
645
645
)
646
646
self .assertNumFlows (0 )
647
647
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ def test_timeout_during_handshake(self):
164
164
self .fail ("did not raise" )
165
165
self .assertEqual (
166
166
str (raised .exception ),
167
- "timed out during handshake" ,
167
+ "timed out while waiting for handshake response " ,
168
168
)
169
169
170
170
def test_connection_closed_during_handshake (self ):
You can’t perform that action at this time.
0 commit comments