diff --git a/src/ansys/dyna/core/pre/dynasolution.py b/src/ansys/dyna/core/pre/dynasolution.py index 563d72df8..6c3d59f49 100644 --- a/src/ansys/dyna/core/pre/dynasolution.py +++ b/src/ansys/dyna/core/pre/dynasolution.py @@ -433,8 +433,8 @@ def save_file(self): def quit(self): """Delete remote instance.""" - if self.pim_client is not None: - self.pim_client.close() if self.remote_instance is not None: self.remote_instance.delete() + if self.pim_client is not None: + self.pim_client.close() return diff --git a/src/ansys/dyna/core/solver/dynasolver.py b/src/ansys/dyna/core/solver/dynasolver.py index e702beace..e52fd5fd1 100644 --- a/src/ansys/dyna/core/solver/dynasolver.py +++ b/src/ansys/dyna/core/solver/dynasolver.py @@ -350,10 +350,10 @@ def quit(self): command and continues running. """ self.logger.debug("quit") - if self.pim_client is not None: - self.pim_client.close() if self.remote_instance is not None: self.remote_instance.delete() + if self.pim_client is not None: + self.pim_client.close() request = dynasolver_pb2.QuitServer() # ALWAYS returns ACK, so don't bother checking self.stub.quit_server(request)