[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
Michael Meeks
michael.meeks at collabora.com
Thu Apr 27 09:14:19 UTC 2017
wsd/LOOLWSD.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit fc8563e778a1ef7db464f35197e23e6e7f7b9bb8
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed Apr 26 17:38:50 2017 +0100
Add LOOL_DELAY_SOCKET_MS env. var to simulate latency.
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index a783b269..51a4691b 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -169,7 +169,7 @@ int MasterPortNumber = DEFAULT_MASTER_PORT_NUMBER;
static bool DisplayVersion = false;
/// Funky latency simulation basic delay (ms)
-static int SimulatedLatencyMs = 0; // 150;
+static int SimulatedLatencyMs = 0;
// Tracks the set of prisoners / children waiting to be used.
static std::mutex NewChildrenMutex;
@@ -987,6 +987,10 @@ void LOOLWSD::handleOption(const std::string& optionName,
static const char* masterPort = std::getenv("LOOL_TEST_MASTER_PORT");
if (masterPort)
MasterPortNumber = std::stoi(masterPort);
+
+ static const char* latencyMs = std::getenv("LOOL_DELAY_SOCKET_MS");
+ if (latencyMs)
+ SimulatedLatencyMs = std::stoi(latencyMs);
#endif
#ifdef FUZZER
@@ -1615,6 +1619,7 @@ private:
Admin::instance().insertNewSocket(moveSocket);
});
}
+
}
// Client post and websocket connections
else if ((request.getMethod() == HTTPRequest::HTTP_GET ||
More information about the Libreoffice-commits
mailing list