mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-07-01 07:21:05 +02:00
fix: Retry device name detection when bridge is not ready at startup
The background thread now retries with exponential backoff (5s→60s) instead of giving up after 3 attempts. Also accepts detected device name from bridge even when bridge health status is unhealthy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -996,7 +996,7 @@ def fetch_device_name_from_bridge(max_retries: int = 3, retry_delay: float = 2.0
|
||||
response = requests.get(bridge_health_url, timeout=5)
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
if data.get('status') == 'healthy':
|
||||
if data.get('status') == 'healthy' or data.get('device_name_source') == 'detected':
|
||||
device_name = data.get('device_name')
|
||||
source = data.get('device_name_source', 'unknown')
|
||||
if device_name:
|
||||
|
||||
Reference in New Issue
Block a user