fix(sfm): construct the DeviceAccess singleton at import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-10-21 01:45:17 -04:00
1 parent 52ada0215c
commit aa79e996c5
1 file changed
+2 -4
+2 -4
View File
@@ -357,13 +357,11 @@ def _run_with_retry(fn, *, is_tcp: bool):
# same contract for Series 3 and 4. Without `serial`, handlers run their
# legacy Series-3 path unchanged (spec 2026-10-20).
_device_access_instance: Optional[DeviceAccess] = None
# Constructing it does no I/O and starts no thread until a Series-4 session exists.
_device_access_instance: DeviceAccess = DeviceAccess()
def _device_access() -> DeviceAccess:
global _device_access_instance
if _device_access_instance is None:
_device_access_instance = DeviceAccess()
return _device_access_instance