添加DEBUG功能
This commit is contained in:
@@ -227,7 +227,8 @@ class Presenter:
|
|||||||
continue
|
continue
|
||||||
except ConnectionResetError:
|
except ConnectionResetError:
|
||||||
print("Warring: clietn force disconnect!!! ")
|
print("Warring: clietn force disconnect!!! ")
|
||||||
break
|
server.conn_close()
|
||||||
|
continue
|
||||||
except socket.error as e:
|
except socket.error as e:
|
||||||
print(f"Net Error: {e}")
|
print(f"Net Error: {e}")
|
||||||
break
|
break
|
||||||
@@ -271,10 +272,10 @@ class Presenter:
|
|||||||
print("KeyboardInterrupt (Ctrl+C) shutting down")
|
print("KeyboardInterrupt (Ctrl+C) shutting down")
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
|
server.close()
|
||||||
for key in self.process3d_info.keys():
|
for key in self.process3d_info.keys():
|
||||||
self.process3d_info[key].in_q.put(0)
|
self.process3d_info[key].in_q.put(0)
|
||||||
for key in self.process2d_info.keys():
|
for key in self.process2d_info.keys():
|
||||||
self.process2d_info[key].in_q.put(0)
|
self.process2d_info[key].in_q.put(0)
|
||||||
ArenaCamera.shutdown()
|
ArenaCamera.shutdown()
|
||||||
print("关闭连接")
|
print("关闭连接")
|
||||||
server.close()
|
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
from _typeshed import Self
|
||||||
|
from ctypes import set_errno
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
|
|
||||||
@@ -25,6 +27,8 @@ class TcpServer:
|
|||||||
def send_data(self, data: bytes):
|
def send_data(self, data: bytes):
|
||||||
self.conn.sendall(data)
|
self.conn.sendall(data)
|
||||||
|
|
||||||
def close(self):
|
def conn_close(self):
|
||||||
self.conn.close()
|
self.conn.close()
|
||||||
|
|
||||||
|
def close(self):
|
||||||
self.sock.close()
|
self.sock.close()
|
||||||
|
Reference in New Issue
Block a user