Correct misplacement of decrementing current connections counter.

This commit is contained in:
counterpoint
2015-10-13 16:19:24 +02:00
parent cc42707dc0
commit efc0c7420e

View File

@ -578,15 +578,19 @@ dcb_process_victim_queue(DCB *listofdcb)
nzombies++;
if (nzombies > maxzombies) maxzombies = nzombies;
spinlock_release(&zombiespin);
if (dcb->server)
{
atomic_add(&dcb->server->stats.n_current, -1);
}
dcb = nextdcb;
continue;
}
}
}
/*
* Into the final close logic, so if DCB is for backend server, we
* must decrement the number of current connections.
*/
if (dcb->server)
{
atomic_add(&dcb->server->stats.n_current, -1);
}
/**
* close protocol and router session
*/