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