[Libreoffice-commits] online.git: loolwsd/Common.hpp loolwsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Apr 11 03:12:24 UTC 2016
loolwsd/Common.hpp | 1 +
loolwsd/LOOLWSD.cpp | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 63068a5dda82c055b5d6844067e70d585d0fb4a2
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Apr 10 22:16:04 2016 -0400
loolwsd: command timeout is now a const
Change-Id: I9115f465fe760f4c388294bfb5e14cbb441c1174
Reviewed-on: https://gerrit.libreoffice.org/23979
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/Common.hpp b/loolwsd/Common.hpp
index d09c08b..1984f4d 100644
--- a/loolwsd/Common.hpp
+++ b/loolwsd/Common.hpp
@@ -21,6 +21,7 @@ constexpr int MASTER_PORT_NUMBER = 9981;
constexpr int MAINTENANCE_INTERVAL = 1;
constexpr int CHILD_TIMEOUT_SECS = 10;
constexpr int POLL_TIMEOUT_MS = 1000;
+constexpr int COMMAND_TIMEOUT_MS = 5000;
/// Pipe and Socket read buffer size.
/// Should be large enough for ethernet packets
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 0f5a391..bf35d51 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -266,7 +266,7 @@ private:
{
AvailableChildSessionCV.wait_for(
lock,
- std::chrono::milliseconds(3000),
+ std::chrono::milliseconds(COMMAND_TIMEOUT_MS),
[&isFound, &clientSession]
{
return (isFound = AvailableChildSessions.find(clientSession->getId()) != AvailableChildSessions.end());
@@ -354,7 +354,7 @@ private:
response.send();
return;
}
- // Now the bridge beetween the client and kit process is connected
+ // Now the bridge between the client and kit processes is connected
// Let messages flow
std::string encodedFrom;
@@ -600,7 +600,7 @@ private:
// Note: technically, there is a race between these two (we should
// hold the broker lock before issueing the save and waiting,)
// but in practice this shouldn't happen.
- if (docBroker->autoSave(true) && !docBroker->waitSave(5000))
+ if (docBroker->autoSave(true) && !docBroker->waitSave(COMMAND_TIMEOUT_MS))
{
Log::error("Auto-save before closing failed.");
}
More information about the Libreoffice-commits
mailing list