@@ -21,7 +21,7 @@ static void handlerSigTerm(const int) noexcept
2121{
2222 if (globalServerPtr)
2323 {
24- globalServerPtr->controls . stopProcess ();
24+ globalServerPtr->stop ();
2525 }
2626}
2727
@@ -32,7 +32,7 @@ static void handlerSigInt(const int) noexcept
3232{
3333 if (globalServerPtr)
3434 {
35- globalServerPtr->controls . stopProcess ();
35+ globalServerPtr->stop ();
3636 }
3737}
3838
@@ -43,8 +43,7 @@ static void handlerSigUsr1(const int) noexcept
4343{
4444 if (globalServerPtr)
4545 {
46- globalServerPtr->controls .setRestart ();
47- globalServerPtr->controls .stopProcess ();
46+ globalServerPtr->restart ();
4847 }
4948}
5049
@@ -55,9 +54,7 @@ static void handlerSigUsr2(const int) noexcept
5554{
5655 if (globalServerPtr)
5756 {
58- globalServerPtr->controls .setUpdateModule ();
59- globalServerPtr->controls .setProcess (false );
60- globalServerPtr->controls .setProcessQueue ();
57+ globalServerPtr->update ();
6158 }
6259}
6360
@@ -108,7 +105,7 @@ static ::LRESULT CALLBACK WndProc(const ::HWND hWnd, const ::UINT message, const
108105
109106 case WM_ENDSESSION:
110107 {
111- ::HANDLE hThread = ::OpenThread (SYNCHRONIZE, false , gMainThreadId );
108+ const ::HANDLE hThread = ::OpenThread (SYNCHRONIZE, false , gMainThreadId );
112109 ::WaitForSingleObject (hThread, INFINITE);
113110 ::CloseHandle (hThread);
114111 break ;
@@ -158,7 +155,7 @@ static ::BOOL consoleSignalHandler(const ::DWORD ctrlType) noexcept
158155 case CTRL_SHUTDOWN_EVENT:
159156 {
160157 handlerSigTerm (ctrlType);
161- ::HANDLE hThread = ::OpenThread (SYNCHRONIZE, false , gMainThreadId );
158+ const ::HANDLE hThread = ::OpenThread (SYNCHRONIZE, false , gMainThreadId );
162159 ::WaitForSingleObject (hThread, INFINITE);
163160 ::CloseHandle (hThread);
164161 return true ;
@@ -190,7 +187,7 @@ bool bindSignalHandlers(HttpServer::Server *server) noexcept
190187
191188 const ::HINSTANCE hInstance = ::GetModuleHandle (nullptr );
192189
193- ::WNDCLASSEX wcex = {};
190+ ::WNDCLASSEX wcex {};
194191
195192 wcex.cbSize = sizeof (::WNDCLASSEX);
196193 wcex.lpfnWndProc = WndProc;
@@ -211,7 +208,7 @@ bool bindSignalHandlers(HttpServer::Server *server) noexcept
211208
212209#elif POSIX
213210
214- struct ::sigaction act = {};
211+ struct ::sigaction act {};
215212
216213 act.sa_handler = handlerSigInt;
217214 ::sigaction (SIGINT, &act, nullptr );
0 commit comments