Skip to content

Fix hotplug usb reset with external guiders#2369

Closed
cfuture81 wants to merge 2 commits intoindilib:masterfrom
cfuture81:fix-hotplug-usb-reset
Closed

Fix hotplug usb reset with external guiders#2369
cfuture81 wants to merge 2 commits intoindilib:masterfrom
cfuture81:fix-hotplug-usb-reset

Conversation

@cfuture81
Copy link
Copy Markdown
Contributor

Some INDI camera drivers perform a USB reset after each frame
readout. During this brief reset window the device transiently disappears from
USB enumeration. The HotPlug manager sees the disappearance and calls
destroyDevice(), which invalidates every property pointer held by connected
clients (KStars, PHD2, etc.). When the device reappears milliseconds later it is
re-created from scratch, but the clients are left with dangling references.

This patch adds an isConnected() check before removal. If the device is actively
connected to a client the removal is skipped and a debug message is logged. The
device will still be cleaned up normally if it genuinely disconnects.

Tested with ZWO ASI220MM Mini on StellarMate (aarch64) during extended
single-exposure and streaming guide sessions.

Andreas Ruthner added 2 commits April 11, 2026 11:01
…tching base class LX200Telescope::Sync() behavior — prevents ~50s ALIGN_SYNCING stall in KStars/Ekos
…resets — prevents INDI client property cache invalidation when cameras (e.g. ZWO ASI) reset USB after frame readout
@cfuture81 cfuture81 closed this May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant