From 2f3ea33531d0dc958d79c51b729d97f64efe8205 Mon Sep 17 00:00:00 2001 From: psy Date: Sun, 8 Sep 2013 08:08:50 -0700 Subject: [PATCH] added different thread to webserver --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index a6aef5b..99882b3 100644 --- a/main.py +++ b/main.py @@ -17,7 +17,7 @@ except: print "\nError importing: sqlite3 lib. \n\nOn Debian based systems, please try like root:\n\n $ apt-get install sqlite3\n" sys.exit(2) -import subprocess, socket, thread +import subprocess, socket, threading from options import BCOptions from webserver import BorderCheckWebserver @@ -337,7 +337,8 @@ class bc(object): geo = self.try_running(self.getGEO, "\nInternal error setting geoIP database.") # start web mode (on a different thread) try: - thread.start_new_thread(BorderCheckWebserver(self)) + t = threading.Thread(target=BorderCheckWebserver, args=(self, )) + t.start() except: print "Error: unable to start thread" pass