loolwsd/LOOLStress.cpp | 5 +++++ 1 file changed, 5 insertions(+) New commits: commit c98af7c5a0436edf9c682e7debad0776d22031b7 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Aug 21 08:21:59 2016 -0400
loolwsd: Poco HTTPRequest and co are not thread-safe Change-Id: I5b7a290651a51f117da1dd972f4c24bdebd2b3b2 Reviewed-on: https://gerrit.libreoffice.org/28300 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/LOOLStress.cpp b/loolwsd/LOOLStress.cpp index 9d331d1..380bb85 100644 --- a/loolwsd/LOOLStress.cpp +++ b/loolwsd/LOOLStress.cpp @@ -85,6 +85,8 @@ public: { Poco::URI uri(serverURI); + std::unique_lock<std::mutex> lock(Mutex); + // Load a document and get its status. std::cerr << "NewSession [" << sessionId << "]: " << uri.toString() << "... "; Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, "/lool/ws/" + documentURL); @@ -111,8 +113,11 @@ private: const std::string _documentURL; const std::string _sessionId; std::shared_ptr<Poco::Net::WebSocket> _ws; + static std::mutex Mutex; }; +std::mutex Connection::Mutex; + /// Main thread class to replay a trace file. class Worker: public Runnable { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits