mirror of https://github.com/yandex/odyssey.git
Fix clients computation during enforcing route max_clients
All router->clients interactions must be atomic. Furthermore all decrements must go throug od_frontend_close
This commit is contained in:
parent
155938d3a8
commit
c5b1a12f7d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue