new strategies
This commit is contained in:
@ -74,13 +74,13 @@ def start_live_feed(shared_prices_dict, log_level='off'):
|
||||
# --- Watchdog Logic ---
|
||||
time.sleep(15) # Check the connection every 15 seconds
|
||||
|
||||
if info is None or not info.ws_manager.is_running():
|
||||
# --- FIX: Log this critical failure to the persistent error log ---
|
||||
# --- FIX: Changed 'is_running()' to the correct method 'is_alive()' ---
|
||||
if info is None or not info.ws_manager.is_alive():
|
||||
error_msg = "WebSocket connection lost or not running. Attempting to reconnect..."
|
||||
logging.warning(error_msg)
|
||||
log_error(error_msg, include_traceback=False) # Log it to the file
|
||||
|
||||
if info:
|
||||
if info and info.ws_manager: # Check if ws_manager exists before stopping
|
||||
try:
|
||||
info.ws_manager.stop() # Clean up old manager
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user