Use connection closing flag only for exception handling
Otherwise we kill the beforePrinterDisconnected gcode script...
See #1021
(cherry picked from commit 2fe956e)
This commit is contained in:
parent
e8ef0ba8a4
commit
5f53b704dd
1 changed files with 2 additions and 2 deletions
|
|
@ -1326,7 +1326,7 @@ class MachineCom(object):
|
|||
return line
|
||||
|
||||
def _readline(self):
|
||||
if self._serial == None or self._connection_closing:
|
||||
if self._serial is None:
|
||||
return None
|
||||
|
||||
try:
|
||||
|
|
@ -1646,7 +1646,7 @@ class MachineCom(object):
|
|||
self._doSendWithoutChecksum(commandToSend)
|
||||
|
||||
def _doSendWithoutChecksum(self, cmd):
|
||||
if self._serial is None or self._connection_closing:
|
||||
if self._serial is None:
|
||||
return
|
||||
|
||||
self._log("Send: %s" % cmd)
|
||||
|
|
|
|||
Loading…
Reference in a new issue