aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/httpnull.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenhttp/httpnull.cpp')
-rw-r--r--zenhttp/httpnull.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/zenhttp/httpnull.cpp b/zenhttp/httpnull.cpp
index 4208421e1..1a60e211c 100644
--- a/zenhttp/httpnull.cpp
+++ b/zenhttp/httpnull.cpp
@@ -35,6 +35,12 @@ HttpNullServer::Run(bool IsInteractiveSession)
{
const bool TestMode = !IsInteractiveSession;
+ int WaitTimeout = -1;
+ if (!TestMode)
+ {
+ WaitTimeout = 1000;
+ }
+
#if ZEN_PLATFORM_WINDOWS
if (TestMode == false)
{
@@ -43,13 +49,6 @@ HttpNullServer::Run(bool IsInteractiveSession)
do
{
- int WaitTimeout = -1;
-
- if (!TestMode)
- {
- WaitTimeout = 1000;
- }
-
if (!TestMode && _kbhit() != 0)
{
char c = (char)_getch();
@@ -70,7 +69,7 @@ HttpNullServer::Run(bool IsInteractiveSession)
do
{
- zen::Sleep(1493);
+ m_ShutdownEvent.Wait(WaitTimeout);
}
while (!IsApplicationExitRequested());
#endif