Преглед изворни кода

shutdown network if it exists

justheuristic пре 5 година
родитељ
комит
66f35581d0
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      tesseract/server/__init__.py

+ 2 - 1
tesseract/server/__init__.py

@@ -112,7 +112,8 @@ class TesseractServer(threading.Thread):
         for process in self.conn_handlers:
             process.terminate()
         self.runtime.shutdown()
-        self.network.shutdown()
+        if self.network is not None:
+            self.network.shutdown()
 
 
 def socket_loop(sock, experts):