kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 4d9346681aece322e5d861e026d23c8ad5eba83f
parent dd2dff23184662e33606c8fff719406211760ceb
Author: Joris Vink <joris@coders.se>
Date:   Wed, 14 Feb 2018 13:59:23 +0100

shuffle around pgsql_queue_count.

Diffstat:
src/pgsql.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pgsql.c b/src/pgsql.c @@ -544,7 +544,6 @@ pgsql_queue_add(struct kore_pgsql *pgsql) pgsql_queue_count++; TAILQ_INSERT_TAIL(&pgsql_wait_queue, pgw, list); - pgsql_queue_count++; } static void @@ -575,6 +574,7 @@ pgsql_queue_wakeup(void) #if !defined(KORE_NO_HTTP) if (pgw->pgsql->req != NULL) { if (pgw->pgsql->req->flags & HTTP_REQUEST_DELETE) { + pgsql_queue_count--; TAILQ_REMOVE(&pgsql_wait_queue, pgw, list); kore_pool_put(&pgsql_wait_pool, pgw); continue; @@ -586,9 +586,9 @@ pgsql_queue_wakeup(void) if (pgw->pgsql->cb != NULL) pgw->pgsql->cb(pgw->pgsql, pgw->pgsql->arg); + pgsql_queue_count--; TAILQ_REMOVE(&pgsql_wait_queue, pgw, list); kore_pool_put(&pgsql_wait_pool, pgw); - pgsql_queue_count--; return; } }