🚸 Improve disconnect response while not operational
We don't want to try to send our beforeDisconnect script if we aren't properly connected, as that will severely delay Disconnect execution, so we now limit that to operational states and thus allow a quick(er) connection abort during auto detection or connection attempt.
This commit is contained in:
1 parent
1b05e782bf
commit
b20c15f56d
1 file changed
+1
-1
@@ -959,7 +959,7 @@ class MachineCom(object):
|
||||
self._send_queue_active = False
|
||||
|
||||
if self._serial is not None:
|
||||
if not is_error:
|
||||
if not is_error and self._state in self.OPERATIONAL_STATES:
|
||||
self.sendGcodeScript("beforePrinterDisconnected")
|
||||
if wait:
|
||||
if timeout is not None:
|
||||
|
||||
Reference in new issue
Block a user