add prefix to simulators
This commit is contained in:
2024-08-22 11:06:36 +02:00
parent 23c5d1df22
commit a6ec23fb24
+4 -3
View File
@@ -6,15 +6,16 @@
#include "simulators.hpp" #include "simulators.hpp"
#include "websocket.hpp" #include "websocket.hpp"
Simulators simulators; Simulators g_simulators;
Websocket* g_web_socket; Websocket* g_web_socket;
void int_handler(int s) void int_handler(int s)
{ {
UNUSED(s); UNUSED(s);
std::cout << "\nCaught Ctrl + C\nShutting down." << std::endl; std::cout << "\nCaught Ctrl + C\nShutting down." << std::endl;
g_web_socket->stop(); if (g_web_socket != nullptr)
simulators.stop(); g_web_socket->stop();
g_simulators.stop();
// delay // delay
std::this_thread::sleep_for(std::chrono::milliseconds(1000)); std::this_thread::sleep_for(std::chrono::milliseconds(1000));
exit(1); exit(1);