From: Alan T. DeKok Date: Tue, 18 Aug 2020 13:11:35 +0000 (-0400) Subject: mark the message "done" if we didn't send it to the worker X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0adee2ee5a4e872a0a61e1d99f9fe9518d64dbe8;p=thirdparty%2Ffreeradius-server.git mark the message "done" if we didn't send it to the worker --- diff --git a/src/lib/io/network.c b/src/lib/io/network.c index 7276606e697..6ab066d77d2 100644 --- a/src/lib/io/network.c +++ b/src/lib/io/network.c @@ -551,8 +551,11 @@ retry: if (nr->num_workers == 1) { worker = nr->workers[0]; if (worker->blocked) { - RATE_LIMIT_GLOBAL(ERROR, "Failed sending packet to worker - " - "In single-threaded mode and worker is blocked"); + RATE_LIMIT_GLOBAL(ERROR, "Failed sending packet to worker - " + "In single-threaded mode and worker is blocked"); + drop: + worker->stats.dropped++; + fr_message_done(&cd->m); return -1; } @@ -590,7 +593,7 @@ retry: if (!found) { RATE_LIMIT_GLOBAL(ERROR, "Failed sending packet to worker - Couldn't find active worker, " "%u/%u workers are blocked", nr->num_blocked, nr->num_workers); - return -1; + goto drop; } worker = found; @@ -615,6 +618,7 @@ retry: if (nr->num_blocked == nr->num_workers) { fr_network_suspend(nr); + fr_message_done(&cd->m); return -1; } goto retry;