[Libreoffice-commits] online.git: net/Socket.hpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp
Michael Meeks
michael.meeks at collabora.com
Thu Apr 6 15:36:42 UTC 2017
net/Socket.hpp | 3 ---
wsd/DocumentBroker.cpp | 5 -----
wsd/DocumentBroker.hpp | 3 ---
wsd/LOOLWSD.cpp | 4 ++--
4 files changed, 2 insertions(+), 13 deletions(-)
New commits:
commit 3d945a5c3846d662e878a5daace5554704e0e586
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Apr 6 16:35:55 2017 +0100
Revert "Don't cleanup DocumentBrokers that still have their thread running."
This reverts commit df8dc43be4980302d4287c0692d02cf4fe6ca253.
DocumentBroker::isAlive already checks _threadFinished.
diff --git a/net/Socket.hpp b/net/Socket.hpp
index 42238751..c726f337 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -500,9 +500,6 @@ public:
/// Stop and join the polling thread before returning (if active)
void joinThread();
- /// Did our thread complete its execution
- bool isThreadFinished() { return _threadFinished; }
-
private:
/// Initialize the poll fds array with the right events
void setupPollFds(std::chrono::steady_clock::time_point now,
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 9515fbb4..a5a995df 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -305,11 +305,6 @@ DocumentBroker::~DocumentBroker()
_childProcess.reset();
}
-bool DocumentBroker::isThreadFinished()
-{
- return _poll->isThreadFinished();
-}
-
void DocumentBroker::joinThread()
{
_poll->joinThread();
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 11d50174..d05437e9 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -227,9 +227,6 @@ public:
/// Thread safe termination of this broker if it has a lingering thread
void joinThread();
- /// Is our polling thread safely out of the way
- bool isThreadFinished();
-
/// Loads a document from the public URI into the jail.
bool load(const std::shared_ptr<ClientSession>& session, const std::string& jailId);
bool isLoaded() const { return _isLoaded; }
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 1c446462..e5d4cb68 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -250,8 +250,8 @@ void cleanupDocBrokers()
" DocumentBroker for docKey [" << it->first << "].");
docBroker->stop();
- // Remove only on next pass when the thread is finished.
- if (docBroker->isThreadFinished() && !docBroker->isAlive())
+ // Remove only when not alive.
+ if (!docBroker->isAlive())
{
LOG_INF("Removing " << (idle ? "idle" : "dead") <<
" DocumentBroker for docKey [" << it->first << "].");
More information about the Libreoffice-commits
mailing list