From d740d54f869c6c8680469b0470ab21f3692ed6d6 Mon Sep 17 00:00:00 2001 From: Sander Speetjens Date: Tue, 20 Aug 2024 00:13:01 +0200 Subject: [PATCH] update on shutdown --- tools/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/main.cpp b/tools/main.cpp index 07b5852..a89ef08 100644 --- a/tools/main.cpp +++ b/tools/main.cpp @@ -15,8 +15,10 @@ void int_handler(int s) UNUSED(s); std::cout << "\nCaught Ctrl + C\nShutting down." << std::endl; g_web_socket->stop(); - exit(1); - + simulators.stop(); + // delay + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); + exit(1); } int main(void)