summaryrefslogtreecommitdiff
path: root/lib/server/ServerStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/server/ServerStream.h')
-rw-r--r--lib/server/ServerStream.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/server/ServerStream.h b/lib/server/ServerStream.h
index 32a57bac..34de7def 100644
--- a/lib/server/ServerStream.h
+++ b/lib/server/ServerStream.h
@@ -108,7 +108,7 @@ public:
{
// Child task, dump leaks to trace, which we make sure is on
#ifdef BOX_MEMORY_LEAK_TESTING
- #ifndef NDEBUG
+ #ifndef BOX_RELEASE_BUILD
TRACE_TO_SYSLOG(true);
TRACE_TO_STDOUT(true);
#endif
@@ -120,13 +120,19 @@ public:
}
}
+protected:
+ virtual void NotifyListenerIsReady() { }
+
+public:
virtual void Run2(bool &rChildExit)
{
try
{
- // Wait object with a timeout of 10 seconds, which is a reasonable time to wait before
- // cleaning up finished child processes.
- WaitForEvent connectionWait(10000);
+ // Wait object with a timeout of 1 second, which
+ // is a reasonable time to wait before cleaning up
+ // finished child processes, and allows the daemon
+ // to terminate reasonably quickly on request.
+ WaitForEvent connectionWait(1000);
// BLOCK
{
@@ -218,6 +224,8 @@ public:
}
}
}
+
+ NotifyListenerIsReady();
while(!StopRun())
{
@@ -273,7 +281,7 @@ public:
}
// Log it
- BOX_WARNING("Message from child process " << pid << ": " << logMessage);
+ BOX_NOTICE("Message from child process " << pid << ": " << logMessage);
}
else
{
@@ -365,8 +373,8 @@ private:
};
#define SERVERSTREAM_VERIFY_SERVER_KEYS(DEFAULT_ADDRESSES) \
- {"ListenAddresses", DEFAULT_ADDRESSES, 0, 0}, \
- DAEMON_VERIFY_SERVER_KEYS
+ ConfigurationVerifyKey("ListenAddresses", 0, DEFAULT_ADDRESSES), \
+ DAEMON_VERIFY_SERVER_KEYS
#include "MemLeakFindOff.h"