Explorar o código

shutdown network if it exists

justheuristic %!s(int64=5) %!d(string=hai) anos
pai
achega
66f35581d0
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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:
         for process in self.conn_handlers:
             process.terminate()
             process.terminate()
         self.runtime.shutdown()
         self.runtime.shutdown()
-        self.network.shutdown()
+        if self.network is not None:
+            self.network.shutdown()
 
 
 
 
 def socket_loop(sock, experts):
 def socket_loop(sock, experts):