From c5b1a12f7d474c99d1dc017d98711528b7a7d309 Mon Sep 17 00:00:00 2001 From: Andrey Borodin Date: Wed, 25 Dec 2019 11:09:11 +0500 Subject: [PATCH] Fix clients computation during enforcing route max_clients All router->clients interactions must be atomic. Furthermore all decrements must go throug od_frontend_close --- sources/router.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/router.c b/sources/router.c index bf24a130..c635c5ac 100644 --- a/sources/router.c +++ b/sources/router.c @@ -277,7 +277,6 @@ od_router_route(od_router_t *router, od_config_t *config, od_client_t *client) od_client_pool_total(&route->client_pool) >= rule->client_max) { od_route_unlock(route); od_router_lock(router); - router->clients--; od_rules_unref(rule); od_router_unlock(router); return OD_ROUTER_ERROR_LIMIT_ROUTE;