From c0498ebe686fdc917d355f0e0b4cbefb4f4213bf Mon Sep 17 00:00:00 2001 From: Smittix Date: Mon, 16 Feb 2026 15:38:00 +0000 Subject: [PATCH] fix: Resolve gpsd deadlock causing GPS connect to hang start_gpsd_daemon() acquires _gpsd_process_lock then calls stop_gpsd_daemon() which tries to acquire the same non-reentrant Lock, causing an immediate deadlock. Changed to RLock so the same thread can re-enter the lock. Co-Authored-By: Claude Opus 4.6 --- utils/gps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gps.py b/utils/gps.py index e80a749..88fc7af 100644 --- a/utils/gps.py +++ b/utils/gps.py @@ -490,7 +490,7 @@ def get_current_position() -> GPSPosition | None: # ============================================ _gpsd_process: 'subprocess.Popen | None' = None -_gpsd_process_lock = threading.Lock() +_gpsd_process_lock = threading.RLock() def detect_gps_devices() -> list[dict]: