diff --git a/examples/server/server.cpp b/examples/server/server.cpp index b3b321a47..8b58a275b 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -1164,15 +1164,15 @@ struct server_metrics { } }; -struct Signal { +struct termination_signal { int number; }; -struct StandbyTimeout {}; +struct standby_timeout {}; -using ShutdownReason = std::variant; +using shutdown_reason = std::variant; -std::function shutdown_handler; +std::function shutdown_handler; struct server_queue { int id = 0; @@ -1310,7 +1310,7 @@ struct server_queue { if (!condition_tasks.wait_for(lock, std::chrono::seconds(standby_timeout), pred)) { lock.release()->unlock(); // unlock the unique_lock, before calling the shutdown_handler, as it tries to lock it QUE_INF("%s", "stand-by timeout reached\n"); - shutdown_handler(StandbyTimeout{}); + shutdown_handler(::standby_timeout{}); break; } } else { @@ -2916,7 +2916,7 @@ inline void signal_handler(int signal) { exit(1); } - shutdown_handler(Signal{ signal }); + shutdown_handler(termination_signal{ signal }); } int main(int argc, char ** argv) { @@ -3956,7 +3956,7 @@ int main(int argc, char ** argv) { ctx_server.queue_tasks.on_update_slots(std::bind( &server_context::update_slots, &ctx_server)); - shutdown_handler = [&](ShutdownReason) { + shutdown_handler = [&](shutdown_reason) { ctx_server.queue_tasks.terminate(); };