mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-30 17:46:59 +00:00
Do not process more client requests when modules are shutting down.
This commit is contained in:
parent
e7d9f73e1e
commit
b54e554497
@ -150,7 +150,7 @@ class IModule(multiprocessing.Process):
|
|||||||
def stop(self, signum=None):
|
def stop(self, signum=None):
|
||||||
"""
|
"""
|
||||||
Adds a callback to stop the event loop & ZeroMQ.
|
Adds a callback to stop the event loop & ZeroMQ.
|
||||||
|
|
||||||
:param signum: signal number (if called by the signal handler)
|
:param signum: signal number (if called by the signal handler)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -235,6 +235,11 @@ class IModule(multiprocessing.Process):
|
|||||||
:param request: request from ZeroMQ server
|
:param request: request from ZeroMQ server
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# server is shutting down, do not process
|
||||||
|
# more request
|
||||||
|
if self._stopping:
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
request = zmq.utils.jsonapi.loads(request[0])
|
request = zmq.utils.jsonapi.loads(request[0])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Loading…
Reference in New Issue
Block a user