version 0.40a
authorThomasV <thomasv@gitorious>
Sun, 19 Feb 2012 20:05:04 +0000 (23:05 +0300)
committerThomasV <thomasv@gitorious>
Sun, 19 Feb 2012 20:05:04 +0000 (23:05 +0300)
server.py

index a1346eb..9b2fc49 100755 (executable)
--- a/server.py
+++ b/server.py
@@ -457,7 +457,11 @@ def listen_thread(store):
     s.listen(1)
     while not stopping:
         conn, addr = s.accept()
-        thread.start_new_thread(client_thread, (addr, conn,))
+        try:
+            thread.start_new_thread(client_thread, (addr, conn,))
+        except:
+            # can't start new thread if there is no memory..
+            traceback.print_exc(file=sys.stdout)