Change grpc version to 1.13.x

guochaorong-patch-1
minqiyang 7 years ago
parent adfaf9a665
commit 1d6ecd3c4e

@ -44,8 +44,10 @@ ExternalProject_Add(
# 3. keep only zlib, cares, protobuf, boringssl under "third_party",
# checkout and clean other dirs under third_party
# 4. remove .git, and package the directory.
URL "http://paddlepaddledeps.bj.bcebos.com/grpc-v1.10.x.tar.gz"
URL_MD5 "1f268a2aff6759839dccd256adcc91cf"
#URL "http://paddlepaddledeps.bj.bcebos.com/grpc-v1.10.x.tar.gz"
URL "http://localhost:8000/grpc-v1.13.x.tar.gz"
#URL_MD5 "1f268a2aff6759839dccd256adcc91cf"
URL_MD5 "27019f520a32161396b319e57c24a5ac"
PREFIX ${GRPC_SOURCES_DIR}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""

@ -47,8 +47,11 @@ GRPCClient::~GRPCClient() {
{
std::lock_guard<std::mutex> guard(chan_mutex_);
for (auto& it : channels_) {
LOG(ERROR) << "channel ptr use count:" << it.second.use_count();
LOG(ERROR) << "channel ptr use count:" << it.second.get();
it.second.reset();
}
channels_.clear();
}
client_thread_->join();
}
@ -301,7 +304,9 @@ std::shared_ptr<grpc::Channel> GRPCClient::GetChannel(const std::string& ep) {
auto ch =
grpc::CreateCustomChannel(ep, grpc::InsecureChannelCredentials(), args);
LOG(ERROR) << "get channel ep: " << ep << "count: " << ch.use_count();
channels_[ep] = ch;
LOG(ERROR) << "get channel ep: " << ep << "count: " << ch.use_count();
return ch;
}

@ -84,7 +84,7 @@ void Fprintf(std::ostream& out, const char* fmt, const Args&... args) {
}
template <typename... Args>
std::string Sprintf(const char* fmt = "", const Args&... args) {
std::string Sprintf(const char* fmt, const Args&... args) {
std::ostringstream oss;
Fprintf(oss, fmt, args...);
return oss.str();

Loading…
Cancel
Save