Error now also causes terminate to be called

CURA-1133
This commit is contained in:
Jaime van Kessel 2016-03-21 15:44:27 +01:00
parent 1020ed5dc1
commit 174f150ead

View file

@ -156,6 +156,7 @@ class CuraEngineBackend(Backend):
self._slicing = False self._slicing = False
self._restart = True self._restart = True
self.slicingCancelled.emit() self.slicingCancelled.emit()
self.processingProgress.emit(0)
Logger.log("d", "Attempting to kill the engine process") Logger.log("d", "Attempting to kill the engine process")
if self._process is not None: if self._process is not None:
Logger.log("d", "Killing engine process") Logger.log("d", "Killing engine process")
@ -191,8 +192,7 @@ class CuraEngineBackend(Backend):
def _onSocketError(self, error): def _onSocketError(self, error):
super()._onSocketError(error) super()._onSocketError(error)
self._slicing = False self._terminate()
self.processingProgress.emit(0)
if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]: if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]:
Logger.log("e", "A socket error caused the connection to be reset") Logger.log("e", "A socket error caused the connection to be reset")