Do not try to recreate the socket when we are shutting down anyway

This prevents issues where closing the socket triggers socket creation
and then a deadlock occurs.

Contributes to CURA-1391
This commit is contained in:
Arjen Hiemstra 2016-04-19 16:52:22 +02:00
parent 919e2f55e9
commit c329c2e12d

View file

@ -200,8 +200,10 @@ class CuraEngineBackend(Backend):
self._onChanged()
def _onSocketError(self, error):
super()._onSocketError(error)
if Application.getInstance().isShuttingDown():
return
super()._onSocketError(error)
self._terminate()
if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]: