From 9db4a30bcb3c2afada26e1a8befcd761a8819420 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 28 Aug 2015 11:39:13 +0200 Subject: Destroy the Prolog engine when ending a query --- server/prolog_session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/prolog_session.py b/server/prolog_session.py index c7623f6..ff44a56 100644 --- a/server/prolog_session.py +++ b/server/prolog_session.py @@ -77,7 +77,7 @@ class PrologSession(object): """Stops the Prolog engine.""" with self._access_lock: if self._engine_id is not None: - prolog.engine.stop(self._engine_id) + prolog.engine.destroy(self._engine_id) self._engine_id = None self._problem_id = -1 return [], 'ok', False @@ -85,7 +85,7 @@ class PrologSession(object): def __del__(self): # no locking needed if GC is removing us, as there cannot be any concurrent access by definition if hasattr(self, '_engine_id') and (self._engine_id is not None): - prolog.engine.stop(self._engine_id) + prolog.engine.destroy(self._engine_id) self._engine_id = None def test(self, user_id, problem_id, program): -- cgit v1.2.1