summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/server/ServerStream.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/server/ServerStream.h b/lib/server/ServerStream.h
index 41899e78..c7d81740 100644
--- a/lib/server/ServerStream.h
+++ b/lib/server/ServerStream.h
@@ -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())
{