From bebd531b58dbe1968e435f2c91a6b9e0553aadbd Mon Sep 17 00:00:00 2001 From: William Casarin Date: Wed, 7 Feb 2024 15:14:54 -0800 Subject: [PATCH] nostrdb: return number of items popped when polling Signed-off-by: William Casarin --- nostrdb/src/protected_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostrdb/src/protected_queue.h b/nostrdb/src/protected_queue.h index 1a0106e7..fa317e1a 100644 --- a/nostrdb/src/protected_queue.h +++ b/nostrdb/src/protected_queue.h @@ -173,7 +173,7 @@ static inline int prot_queue_try_pop_all(struct prot_queue *q, void *data, int m q->count -= items_to_pop; pthread_mutex_unlock(&q->mutex); - return 1; + return items_to_pop; } /*