From b54e554497fd88e9fd271e2e963c75973f420834 Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 30 Apr 2014 10:40:07 -0600 Subject: [PATCH] Do not process more client requests when modules are shutting down. --- gns3server/modules/base.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gns3server/modules/base.py b/gns3server/modules/base.py index 95d7e35e..0a15c06d 100644 --- a/gns3server/modules/base.py +++ b/gns3server/modules/base.py @@ -150,7 +150,7 @@ class IModule(multiprocessing.Process): def stop(self, signum=None): """ Adds a callback to stop the event loop & ZeroMQ. - + :param signum: signal number (if called by the signal handler) """ @@ -235,6 +235,11 @@ class IModule(multiprocessing.Process): :param request: request from ZeroMQ server """ + # server is shutting down, do not process + # more request + if self._stopping: + return + try: request = zmq.utils.jsonapi.loads(request[0]) except ValueError: