From 96d23bc31d6b7a2f1ba564ab095fd71a6112e291 Mon Sep 17 00:00:00 2001 From: Andrey Borodin Date: Thu, 30 Apr 2020 15:37:34 +0500 Subject: [PATCH] Fix leaking routing counter --- sources/worker.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/worker.c b/sources/worker.c index b5eaa63a..445b06b7 100644 --- a/sources/worker.c +++ b/sources/worker.c @@ -23,6 +23,7 @@ od_worker(void *arg) { od_worker_t *worker = arg; od_instance_t *instance = worker->global->instance; + od_router_t *router = worker->global->router; for (;;) { machine_msg_t *msg; @@ -48,6 +49,7 @@ od_worker(void *arg) "failed to create coroutine"); od_io_close(&client->io); od_client_free(client); + od_atomic_u32_dec(&router->clients_routing); break; } client->coroutine_id = coroutine_id;