Skip to content

Commit b5b4110

Browse files
authored
SDSIO-Server: Correct USB SDSIO device detection (prevent macOS libusb crash) (#131)
1 parent 22ed952 commit b5b4110

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

ARM.SDS.pdsc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<releases>
1616
<release version="2.1.0-dev">
1717
Active development ...
18+
19+
SDSIO-Server: Correct USB SDSIO device detection (prevent macOS libusb crash)
1820
</release>
1921
</releases>
2022

utilities/sdsio-server.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,7 @@ async def start(self):
890890
dev_class = usb1.HOTPLUG_MATCH_ANY
891891
)
892892
except (AttributeError, usb1.USBError):
893+
# Hotplug not available; use polling monitor thread
893894
self.running = True
894895
self._monitor_thread = threading.Thread(
895896
target=self._monitor_loop,
@@ -915,6 +916,8 @@ async def start(self):
915916
x.submit()
916917
self.in_transfers.append(x)
917918

919+
# Mark server active in the normal path too (hotplug working)
920+
self.running = True
918921
printer.info(f"USB Server running.")
919922

920923
# start polling thread

0 commit comments

Comments
 (0)