summaryrefslogtreecommitdiff
path: root/mesh/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesh/main.c')
-rw-r--r--mesh/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesh/main.c b/mesh/main.c
index 619b17d88..3bca020a0 100644
--- a/mesh/main.c
+++ b/mesh/main.c
@@ -137,8 +137,14 @@ static void signal_handler(uint32_t signo, void *user_data)
return;
l_info("Terminating");
+
mesh_cleanup(true);
- l_timeout_create(1, kill_to, NULL, NULL);
+
+ if (io_type != MESH_IO_TYPE_UNIT_TEST)
+ l_timeout_create(1, kill_to, NULL, NULL);
+ else
+ l_main_quit();
+
terminated = true;
}