diff --git a/mefamo/mefamo.py b/mefamo/mefamo.py index 240b316..1063760 100644 --- a/mefamo/mefamo.py +++ b/mefamo/mefamo.py @@ -160,11 +160,10 @@ def start(self): def _network_loop(self): with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s: - s.connect((self.ip, self.upd_port)) while True: with self.lock: if self.got_new_data: - s.sendall(self.network_data) + s.sendto(self.network_data, (self.ip, self.upd_port)) self.got_new_data = False time.sleep(0.01)