Restart from the tree no longer hangs for 30 s on disconnect
With a wiresheet open, disconnecting first unsubscribed its components and waited for the reply, which a restarting device never sends, so the editor froze until the request timed out. After restart, reboot, quit or hibernate the session is now closed without asking the device anything; a plain Disconnect still unsubscribes first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+4
-2
@@ -60,11 +60,13 @@ class DeviceSession:
|
||||
self.sox_client.update(children, CONFIG | RUNTIME)
|
||||
return root_comp
|
||||
|
||||
def disconnect(self):
|
||||
def disconnect(self, unsubscribe=True):
|
||||
"""Closes the session. unsubscribe=False skips telling the device first -- for a
|
||||
device going down, which would leave the request to time out."""
|
||||
if self.sox_client is None:
|
||||
return
|
||||
try:
|
||||
if self._current_subs:
|
||||
if unsubscribe and self._current_subs:
|
||||
comps = [self.sox_client.cache_get(cid)
|
||||
for cid in self._current_subs]
|
||||
comps = [c for c in comps if c is not None]
|
||||
|
||||
Reference in New Issue
Block a user