From 620944aa8080ba60f7a9205c05967339fdd5ac37 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 6 Nov 2020 14:45:36 +0800 Subject: [PATCH] bugfix --- appPublic/find_player.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/appPublic/find_player.py b/appPublic/find_player.py index 67e1dfa..a809ccc 100644 --- a/appPublic/find_player.py +++ b/appPublic/find_player.py @@ -22,9 +22,7 @@ class BroadcastServer: def run(self): while self.run_flg: try: - print('broadcast_server():wait for receive...',self.port) data, addr = self.udpSerSock.recvfrom(BUFSIZE) - print('broadcast_server(), received=',data,addr) ret = json.dumps(self.info).encode('utf-8') self.udpSerSock.sendto(ret, addr) except Exception as e: @@ -45,7 +43,6 @@ def find_players(port): udpCliSock.settimeout(0.5) udpCliSock.bind(('', 0)) udpCliSock.setsockopt(SOL_SOCKET, SO_BROADCAST, 1) - print('find_players() port=',port) udpCliSock.sendto(b'findplayers', ('255.255.255.255',port)) players = [] while True: @@ -57,7 +54,6 @@ def find_players(port): d['ip'] = addr[0] players.append(d) except Exception as e: - print('error happened',e) break udpCliSock.close() return players