summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2025-09-21 09:44:41 +0000
committerFelix Fietkau2025-09-21 09:44:43 +0000
commitd3be5474f6e6b75544e72c8e1a308a4a8f6102c6 (patch)
treec0046fe65cf58f3db5a29fcba6367c8c2033be03
parentedeb4d6dc690acb476a47e6b11633b5632b08437 (diff)
udebug-cli: ignore zero-length messages in logstream
Prevents stopping the stream when encountering these messages Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rwxr-xr-xudebug-cli2
1 files changed, 2 insertions, 0 deletions
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();