[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Wed Apr 5 04:43:39 UTC 2017
wsd/LOOLWSD.cpp | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
New commits:
commit e0d6ab78354ed82b2ef00c1853ca13a2a83b79cf
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Tue Apr 4 21:28:55 2017 -0400
wsd: stop poll threads before joining
Also add symmetric stopPrisoners to
match startPrisoners to LOOLWSDServer.
Change-Id: I78d76d86a8e7efc0964cd06df2340658c1b6c4ba
Reviewed-on: https://gerrit.libreoffice.org/36111
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index e334f457..b8d943be 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2169,6 +2169,12 @@ public:
PrisonerPoll.insertNewSocket(findPrisonerServerPort(port));
}
+ void stopPrisoners()
+ {
+ PrisonerPoll.stop();
+ PrisonerPoll.joinThread();
+ }
+
void start(const int port)
{
_acceptPoll.startThread();
@@ -2180,7 +2186,9 @@ public:
void stop()
{
_stop = true;
- SocketPoll::wakeupWorld();
+ _acceptPoll.stop();
+ WebServerPoll.stop();
+ SocketPoll::wakeupWorld(); //TODO: Why?
_acceptPoll.joinThread();
WebServerPoll.joinThread();
}
@@ -2475,7 +2483,7 @@ int LOOLWSD::innerMain()
SigUtil::killChild(ForKitProcId);
#endif
- PrisonerPoll.joinThread();
+ srv.stopPrisoners();
// Terminate child processes
LOG_INF("Requesting child processes to terminate.");
More information about the Libreoffice-commits
mailing list