From 4c01cfa193832a51cd6cadcc986cf45cfd9cd7a4 Mon Sep 17 00:00:00 2001 From: Helin Wang Date: Wed, 7 Jun 2017 14:20:22 -0700 Subject: [PATCH] fix variable name --- paddle/pserver/LightNetwork.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/pserver/LightNetwork.cpp b/paddle/pserver/LightNetwork.cpp index 61bd6d358de..922f25734de 100644 --- a/paddle/pserver/LightNetwork.cpp +++ b/paddle/pserver/LightNetwork.cpp @@ -383,7 +383,7 @@ void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) { setOption(sockfd); /// Now connect to the server - int retry_second = 0; + int retry_count = 0; do { if (connect(sockfd, (sockaddr *)&serv_addr, sizeof(serv_addr)) == 0) { break; @@ -391,7 +391,7 @@ void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) { if (errno == ECONNREFUSED) { LOG(WARNING) << "connection refused by pserver, try again!"; - if (retry_second++ >= 7) { + if (retry_count++ >= 7) { LOG(FATAL) << "connection refused by pserver, maybe pserver failed!"; } std::this_thread::sleep_for(std::chrono::seconds(1)); -- GitLab