From f73656237d7baac3732b54930c2d5efb3cc6ae54 Mon Sep 17 00:00:00 2001 From: Julien Vanier Date: Fri, 2 May 2025 08:22:54 -0400 Subject: [PATCH] Don't fail the last firehose read when the number of bytes read is 0 On Windows, the last firehose read may return 0. Don't fail a firehose read in that situation. Signed-off-by: Julien Vanier --- firehose.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firehose.c b/firehose.c index ff502ad..9d0aa97 100644 --- a/firehose.c +++ b/firehose.c @@ -150,7 +150,7 @@ static int firehose_read(struct qdl_device *qdl, int timeout_ms, do { n = qdl_read(qdl, buf, sizeof(buf), 100); - if (n < 0) { + if (n <= 0) { gettimeofday(&now, NULL); if (timercmp(&now, &timeout, <)) continue;