Commit 94222a45 authored by jan.koester's avatar jan.koester
Browse files

test

parent cb1166d2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
#include <httppp/httpd.h>
#include <httppp/exception.h>
#include <netplus/exception.h>
#include <netplus/eventapi.h>

#include <iostream>
#include <thread>
@@ -29,12 +30,14 @@ namespace {
#ifndef _WIN32
static void onSignal(int) {
    if (g_state) g_state->shutdown = true;
    netplus::event::requestStop();
}
#else
static BOOL WINAPI consoleCtrlHandler(DWORD ctrl) {
    if (ctrl == CTRL_C_EVENT || ctrl == CTRL_BREAK_EVENT ||
        ctrl == CTRL_CLOSE_EVENT) {
        if (g_state) g_state->shutdown = true;
        netplus::event::requestStop();
        return TRUE;
    }
    return FALSE;