From 4b6c5caa470c5563bd7cf6c79d5be79992012b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 2 Jun 2017 10:54:27 +0300 Subject: [PATCH] Fix avrorouter client counts The avro client numbers were decremented twice for each client. --- server/modules/routing/avro/avro.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/modules/routing/avro/avro.c b/server/modules/routing/avro/avro.c index 6e5c74674..34b092c3e 100644 --- a/server/modules/routing/avro/avro.c +++ b/server/modules/routing/avro/avro.c @@ -654,11 +654,9 @@ static void freeSession(ROUTER* router_instance, void* router_client_ses) { AVRO_INSTANCE *router = (AVRO_INSTANCE *) router_instance; AVRO_CLIENT *client = (AVRO_CLIENT *) router_client_ses; - int prev_val; - prev_val = atomic_add(&router->stats.n_clients, -1); + ss_debug(int prev_val = )atomic_add(&router->stats.n_clients, -1); ss_dassert(prev_val > 0); - (void) prev_val; free(client->uuid); maxavro_file_close(client->file_handle); @@ -713,9 +711,6 @@ static void closeSession(ROUTER *instance, void *router_session) spinlock_release(&client->file_lock); spinlock_release(&client->catch_lock); - - /* decrease server registered slaves counter */ - atomic_add(&router->stats.n_clients, -1); } /**