소스 검색

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):