@@ -482,12 +482,6 @@ async def block_until_message_available() -> None:
482482 )
483483
484484 def _start_recv_from_ws (self ) -> None :
485- def transition_connecting () -> None :
486- if self ._state in TerminalStates :
487- return
488- self ._state = SessionState .CONNECTING
489- self ._wait_for_connected .clear ()
490-
491485 async def transition_no_connection () -> None :
492486 if self ._state in TerminalStates :
493487 return
@@ -549,7 +543,6 @@ async def block_until_connected() -> None:
549543 client_id = self ._client_id ,
550544 get_state = lambda : self ._state ,
551545 get_ws = lambda : self ._ws ,
552- transition_connecting = transition_connecting ,
553546 transition_no_connection = transition_no_connection ,
554547 reset_session_close_countdown = self ._reset_session_close_countdown ,
555548 close_session = self .close ,
@@ -1073,7 +1066,6 @@ async def _recv_from_ws(
10731066 client_id : str ,
10741067 get_state : Callable [[], SessionState ],
10751068 get_ws : Callable [[], ClientConnection | None ],
1076- transition_connecting : Callable [[], None ],
10771069 transition_no_connection : Callable [[], Awaitable [None ]],
10781070 reset_session_close_countdown : Callable [[], None ],
10791071 close_session : Callable [[], Awaitable [None ]],
@@ -1127,7 +1119,7 @@ async def _recv_from_ws(
11271119 except ConnectionClosed :
11281120 # This triggers a break in the inner loop so we can get back to
11291121 # the outer loop.
1130- transition_connecting ()
1122+ await transition_no_connection ()
11311123 break
11321124 try :
11331125 msg = parse_transport_msg (message )
0 commit comments