mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
fix: add delay after probe to prevent USB claim race with dump1090
rtl_test opens the USB device during probing. After killing the process, the kernel may not release the USB interface immediately. dump1090 then fails with usb_claim_interface error -6. Add a 0.5s delay after probe cleanup to allow the kernel to fully release the device before the actual decoder opens it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -465,6 +465,10 @@ def probe_rtlsdr_device(device_index: int) -> str | None:
|
||||
except OSError:
|
||||
pass
|
||||
proc.wait()
|
||||
if device_found:
|
||||
# Allow the kernel to fully release the USB interface
|
||||
# before the caller opens the device with dump1090/rtl_fm/etc.
|
||||
time.sleep(0.5)
|
||||
|
||||
if error_found:
|
||||
logger.warning(
|
||||
|
||||
Reference in New Issue
Block a user