File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/stompman/stompman Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -129,13 +129,13 @@ def _clear_active_connection_state(self) -> None:
129
129
self ._active_connection_state = None
130
130
131
131
def is_alive (self ) -> bool :
132
- if not self ._connection_manager . _active_connection_state :
132
+ if not self ._active_connection_state :
133
133
return False
134
- if not (last_read_time_ms := self ._connection_manager . _active_connection_state .connection .last_read_time_ms ):
134
+ if not (last_read_time_ms := self ._active_connection_state .connection .last_read_time_ms ):
135
135
return True
136
- if ( time . time () - last_read_time_ms ) > server_heartbeat_interval_seconds :
137
- ...
138
- return None
136
+ return self . _active_connection_state . server_heartbeat . will_send_interval_ms / 1000 > (
137
+ time . time () - last_read_time_ms
138
+ )
139
139
140
140
async def write_heartbeat_reconnecting (self ) -> None :
141
141
for _ in range (self .write_retry_attempts ):
You can’t perform that action at this time.
0 commit comments