common/Common.hpp | 4 ++-- wsd/LOOLWSD.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit afb96fcbad4e36ef4eb07bf6d0b67329b714858e Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Sun Sep 29 17:01:36 2019 -0400 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sat Oct 19 20:55:25 2019 +0200 wsd: allow longer timeout for child forking We need to give the child more time than we poll, so we would get a chance to register prespawned children before we account for any missing ones. Also, allowing only 5 seconds risks spawning too many children on a slow, or somewhat loaded system. This raises the child timeout to twice the poll timeout, which is 5 seconds, allowing for 10 seconds for spawning. Change-Id: I4cc9e2fc656268fa82a935a5cb1626540bd49980 Reviewed-on: https://gerrit.libreoffice.org/80322 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/common/Common.hpp b/common/Common.hpp index 013b30798..599de0779 100644 --- a/common/Common.hpp +++ b/common/Common.hpp @@ -15,9 +15,9 @@ constexpr int DEFAULT_CLIENT_PORT_NUMBER = 9980; constexpr int DEFAULT_MASTER_PORT_NUMBER = 9981; constexpr int COMMAND_TIMEOUT_MS = 5000; -constexpr long CHILD_TIMEOUT_MS = COMMAND_TIMEOUT_MS; +constexpr int CHILD_TIMEOUT_MS = COMMAND_TIMEOUT_MS * 2; constexpr int CHILD_REBALANCE_INTERVAL_MS = CHILD_TIMEOUT_MS / 10; -constexpr int POLL_TIMEOUT_MS = COMMAND_TIMEOUT_MS / 10; +constexpr int POLL_TIMEOUT_MS = COMMAND_TIMEOUT_MS / 5; constexpr int WS_SEND_TIMEOUT_MS = 1000; constexpr int TILE_ROUNDTRIP_TIMEOUT_MS = 5000; diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index c0045b228..93987d71c 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -3190,7 +3190,7 @@ int LOOLWSD::innerMain() } else { - const long timeoutMs = CHILD_TIMEOUT_MS * (LOOLWSD::NoCapsForKit ? 150 : 50); + const int timeoutMs = CHILD_TIMEOUT_MS * (LOOLWSD::NoCapsForKit ? 150 : 50); const auto timeout = std::chrono::milliseconds(timeoutMs); LOG_TRC("Waiting for a new child for a max of " << timeoutMs << " ms."); if (!NewChildrenCV.wait_for(lock, timeout, []() { return !NewChildren.empty(); })) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits