From d3be5474f6e6b75544e72c8e1a308a4a8f6102c6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 21 Sep 2025 11:44:41 +0200 Subject: [PATCH] udebug-cli: ignore zero-length messages in logstream Prevents stopping the stream when encountering these messages Signed-off-by: Felix Fietkau --- udebug-cli | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udebug-cli b/udebug-cli index 1f59684..1598643 100755 --- a/udebug-cli +++ b/udebug-cli @@ -188,6 +188,8 @@ function poll_data() { if (length(data) > 0) { if (log_out) { udebug.foreach_packet(data, (entry, data, timestamp) => { + if (!length(data)) + return; if ((opts.timestamp && !log_out.write(sprintf("[%.6f] ", timestamp / 1000000.0))) || !log_out.write(data) || !log_out.write("\n")) uloop.end(); -- 2.30.2