From c329c2e12d4d419fce4386d5e8da5c188d84204b Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 19 Apr 2016 16:52:22 +0200 Subject: [PATCH] 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 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 59a802045a..7a5d332d9e 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -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]: