Always reset the job data on disconnect

If former state was "Printing", so far the full disconnect state handling
wasn't done properly.
This commit is contained in:
Gina Häußge 2016-02-16 09:52:56 +01:00
parent 4081a25f48
commit 1ea0cf9213

View file

@ -784,7 +784,8 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self._analysisQueue.resume() # printing done, put those cpu cycles to good use
elif state == comm.MachineCom.STATE_PRINTING:
self._analysisQueue.pause() # do not analyse files while printing
elif state == comm.MachineCom.STATE_CLOSED or state == comm.MachineCom.STATE_CLOSED_WITH_ERROR:
if state == comm.MachineCom.STATE_CLOSED or state == comm.MachineCom.STATE_CLOSED_WITH_ERROR:
if self._comm is not None:
self._comm = None