Fix avrorouter client counts
The avro client numbers were decremented twice for each client.
This commit is contained in:
parent
285598e0e5
commit
d5a72d1b75
@ -707,11 +707,9 @@ static void freeSession(MXS_ROUTER* router_instance, MXS_ROUTER_SESSION* router_
|
||||
{
|
||||
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);
|
||||
@ -766,9 +764,6 @@ static void closeSession(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_sessio
|
||||
|
||||
spinlock_release(&client->file_lock);
|
||||
spinlock_release(&client->catch_lock);
|
||||
|
||||
/* decrease server registered slaves counter */
|
||||
atomic_add(&router->stats.n_clients, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user