From 41b244c99b23461e7ac873eb8e985ed44f4d801f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 4 Dec 2025 16:00:39 +0200 Subject: [PATCH] auth: Fix user iteration when there were many users The iteration stopped in the middle and an error was logged: auth: Error: auth-worker: Aborted LIST request for *: Shutting down Broken by f591498845fd7b5e11f1085b6e1f5e34dcc84767 --- src/auth/auth-worker-connection.c | 3 ++- src/auth/auth-worker-connection.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/auth/auth-worker-connection.c b/src/auth/auth-worker-connection.c index 775413085f..3090e96182 100644 --- a/src/auth/auth-worker-connection.c +++ b/src/auth/auth-worker-connection.c @@ -341,7 +341,8 @@ static int auth_worker_request_handle(struct auth_worker_connection *worker, if (!_request->callback(worker, args, _request->context)) { worker->timeout_pending_resume = FALSE; timeout_remove(&worker->to_lookup); - return -1; + connection_input_halt(&worker->conn); + return 0; } return 1; } diff --git a/src/auth/auth-worker-connection.h b/src/auth/auth-worker-connection.h index bdce677dbf..e08a17c7b4 100644 --- a/src/auth/auth-worker-connection.h +++ b/src/auth/auth-worker-connection.h @@ -5,6 +5,9 @@ struct auth_request; struct auth_stream_reply; struct auth_worker_connection; +/* Returns TRUE if worker input can be read more, FALSE if input + reading should be stopped until auth_worker_connection_resume_input() is + called again. */ typedef bool auth_worker_callback_t(struct auth_worker_connection *conn, const char *const *args, void *context); -- 2.47.3