This commit is contained in:
yumoqing 2021-07-14 14:33:00 +08:00
parent 2315f8706a
commit 35bfe95bfb

View File

@ -24,11 +24,8 @@ class UdpComm:
while self.run_flg:
try:
b, addr = self.udpSerSock.recvfrom(BUFSIZE)
data = json.loads(b)
if addr[0] != self.host:
self.callback(data, addr)
# ret = json.dumps(self.info).encode('utf-8')
# self.udpSerSock.sendto(ret, addr)
self.callback(b, addr)
except Exception as e:
print('exception happened:',e)
pass