From 5958a2754bae5c3af011b1d44506458eda7a2b44 Mon Sep 17 00:00:00 2001 From: David Galeano Date: Tue, 29 Aug 2023 15:55:37 +0100 Subject: [PATCH] Update waitpdu_len when a pdu times out. Otherwise the value of waitpdu_len gets out of sync with the actual number of pdus on the waitpdu hash table and the reported queue length is always higher than it really is. --- lib/socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/socket.c b/lib/socket.c index 966add7b..c6b27f51 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -607,6 +607,7 @@ rpc_timeout_scan(struct rpc_context *rpc) if (!q->head) { q->tail = NULL; } + rpc->waitpdu_len--; // qqq move to a temporary queue and process after // we drop the mutex rpc_set_error(rpc, "command timed out");