wsd/LOOLWSD.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit fc8563e778a1ef7db464f35197e23e6e7f7b9bb8 Author: Michael Meeks <michael.me...@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 || _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits