diff --git a/TODO.md b/TODO.md index c016c35..f0ebe5a 100644 --- a/TODO.md +++ b/TODO.md @@ -1 +1,2 @@ -- one echo too much? \ No newline at end of file +- one echo too much? +- add keepalive to loop! \ No newline at end of file diff --git a/udp2mqtt.py b/udp2mqtt.py index 33ce797..e780895 100644 --- a/udp2mqtt.py +++ b/udp2mqtt.py @@ -66,6 +66,8 @@ def on_log(mqttc, obj, level, string): while KeyboardInterrupt: time.sleep(0.2) # anti flood + # FIXME: ADD KEEPALIVE SIGNAL + try: data_bytes, addr = client_socket.recvfrom(64) client = addr[0] + ':' + str(addr[1])