From 8777152ec9e75376410117031904f7de5649d104 Mon Sep 17 00:00:00 2001 From: noisyfox Date: Sat, 7 Jan 2017 19:58:32 +1100 Subject: [PATCH] Run db thread as daemon so that all sub-thread will inherite this and be killed automatically if main thread crash --- server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/server.py b/server.py index 4636721..e6c3dc6 100644 --- a/server.py +++ b/server.py @@ -32,6 +32,7 @@ from configloader import load_config, get_config class MainThread(threading.Thread): def __init__(self, obj): threading.Thread.__init__(self) + self.daemon = True self.obj = obj def run(self):