Live mode: load sheets off the UI thread, go offline cleanly on a lost device
Opening a sheet ran its Sox requests on the UI thread, so a device that had gone away (a closed simulator) froze the window until DASP's 30 s receive timeout. The load now runs on a background thread and the sheet is painted when it finishes; a load the user has clicked away from is dropped. When the session closes, the editor goes offline with "Connection lost: <cause>" instead of printing a traceback. A send waiting for room in the send window now fails when the session closes rather than going out after the CLOSE. The tree-expand error callback no longer reads the exception after its except block has ended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -111,6 +111,10 @@ class DeviceSession:
|
||||
def is_connected(self):
|
||||
return self.sox_client is not None and not self.sox_client.is_closed
|
||||
|
||||
@property
|
||||
def close_cause(self):
|
||||
return self.sox_client.close_cause if self.sox_client else "disconnected"
|
||||
|
||||
# ── Schema → Slot Registry ──────────────────────────────────
|
||||
|
||||
def _load_slot_registry(self, parts):
|
||||
|
||||
Reference in New Issue
Block a user