提交 4c01cfa1 编写于 作者: H Helin Wang

fix variable name

上级 92626ba3
...@@ -383,7 +383,7 @@ void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) { ...@@ -383,7 +383,7 @@ void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) {
setOption(sockfd); setOption(sockfd);
/// Now connect to the server /// Now connect to the server
int retry_second = 0; int retry_count = 0;
do { do {
if (connect(sockfd, (sockaddr *)&serv_addr, sizeof(serv_addr)) == 0) { if (connect(sockfd, (sockaddr *)&serv_addr, sizeof(serv_addr)) == 0) {
break; break;
...@@ -391,7 +391,7 @@ void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) { ...@@ -391,7 +391,7 @@ void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) {
if (errno == ECONNREFUSED) { if (errno == ECONNREFUSED) {
LOG(WARNING) << "connection refused by pserver, try again!"; 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!"; LOG(FATAL) << "connection refused by pserver, maybe pserver failed!";
} }
std::this_thread::sleep_for(std::chrono::seconds(1)); std::this_thread::sleep_for(std::chrono::seconds(1));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册