diff --git a/client/client.cpp b/client/client.cpp index 2d7f151..cc73231 100644 --- a/client/client.cpp +++ b/client/client.cpp @@ -146,6 +146,10 @@ bool CClient::down_one_file(const std::string& id, const std::string& file) return false; } down_->trans_state_ = TRANS_REDAY; + while (down_->trans_state_ != TRANS_DONE) { + std::this_thread::sleep_for(std::chrono::milliseconds(10)); + } + return true; }