diff --git a/README.md b/README.md index 9e01a9c..a3cab95 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ If you want to generate an Xcode project `cmake -G Xcode`. ### Linux -1. `sudo apt install build-essential autoconf gcc gcc-multilib g++-multilib libtool` +1. `sudo apt install build-essential autoconf gcc gcc-multilib g++-multilib libtool cmake` 2. Install protobuf - from the root folder run: 1. `cd protobuf` 2. `./autogen.sh` diff --git a/boiler-writter/CSGOMatchList.cpp b/boiler-writter/CSGOMatchList.cpp index e4e97ec..b43489f 100644 --- a/boiler-writter/CSGOMatchList.cpp +++ b/boiler-writter/CSGOMatchList.cpp @@ -53,8 +53,11 @@ void CSGOMatchList::Refresh() void CSGOMatchList::RefreshWait() { m_updateComplete = false; - Refresh(); std::unique_lock lock(m_matchMutex); + // wait a bit before sending the refreshing otherwise we may not get the response + m_updateCv.wait_for(lock, std::chrono::seconds(1)); + Refresh(); + std::cv_status status = m_updateCv.wait_for(lock, std::chrono::seconds(10)); if (status == std::cv_status::timeout) { throw BoilerException(BoilerExitCode::AlreadyConnectedToGC, "Already connected to GC, matches can't be received");