File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1076,7 +1076,7 @@ async def _setup_heartbeat(
10761076
10771077 await asyncio .sleep (heartbeat_ms / 1000 )
10781078 state = get_state ()
1079- if state == SessionState . CONNECTING :
1079+ if state in ConnectingStates :
10801080 logger .debug ("Websocket is not connected, not sending heartbeat" )
10811081 continue
10821082 try :
@@ -1132,7 +1132,7 @@ async def _serve(
11321132 while our_task and not our_task .cancelling () and not our_task .cancelled ():
11331133 logging .debug (f"_serve loop count={ idx } " )
11341134 idx += 1
1135- while (ws := get_ws ()) is None or get_state () == SessionState . CONNECTING :
1135+ while (ws := get_ws ()) is None or get_state () in ConnectingStates :
11361136 logging .debug ("_handle_messages_from_ws spinning while connecting" )
11371137 await block_until_connected ()
11381138 logger .debug (
You can’t perform that action at this time.
0 commit comments