diff options
| author | Felix Fietkau | 2025-09-21 09:44:41 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2025-09-21 09:44:43 +0000 |
| commit | d3be5474f6e6b75544e72c8e1a308a4a8f6102c6 (patch) | |
| tree | c0046fe65cf58f3db5a29fcba6367c8c2033be03 | |
| parent | edeb4d6dc690acb476a47e6b11633b5632b08437 (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-x | udebug-cli | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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(); |