Skip to content

Commit

Permalink
Update waitpdu_len when a pdu times out.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davidgaleano committed Aug 29, 2023
1 parent 0a6991c commit 5958a27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 5958a27

Please sign in to comment.