From 2f5e74718df9252f65a92b37f759b0efd902d7e9 Mon Sep 17 00:00:00 2001 From: 8cH9azbsFifZ Date: Thu, 16 Nov 2023 20:50:32 +0100 Subject: [PATCH] todo --- TODO.md | 3 ++- udp2mqtt.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) 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])