Merge 4e5967ff09 into 0b906a1c3e
This commit is contained in:
commit
10eb9df9cc
|
|
@ -1079,6 +1079,16 @@ class WebSocketServer(object):
|
|||
|
||||
except (self.Terminate, SystemExit, KeyboardInterrupt):
|
||||
self.msg("In exit")
|
||||
# terminate all child processes
|
||||
if multiprocessing and not self.run_once:
|
||||
childs = multiprocessing.active_children()
|
||||
|
||||
for child in childs:
|
||||
pid = child.pid
|
||||
if pid != os.getpid():
|
||||
self.msg("Terminating child %s" % pid)
|
||||
child.terminate()
|
||||
|
||||
break
|
||||
except Exception:
|
||||
exc = sys.exc_info()[1]
|
||||
|
|
|
|||
Loading…
Reference in New Issue