From 5ae4339a5b77f9db95ba5f6e64fe7d3735e09fb4 Mon Sep 17 00:00:00 2001 From: wangyanfei01 Date: Fri, 23 Dec 2016 11:29:49 +0800 Subject: [PATCH] follow comments: remove flags control --- paddle/pserver/LightNetwork.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/paddle/pserver/LightNetwork.cpp b/paddle/pserver/LightNetwork.cpp index 9ddfa5bbb16..8c8ba0a2e51 100644 --- a/paddle/pserver/LightNetwork.cpp +++ b/paddle/pserver/LightNetwork.cpp @@ -50,10 +50,6 @@ DEFINE_int32(sock_recv_buf_size, 1024 * 1024 * 40, "restrict sock recv buff size"); -DEFINE_int32(connrefused_retries_second, - 10, - "retry connrefused_retries_second if ECONNREFUSED occurs"); - namespace paddle { /** @@ -393,7 +389,7 @@ void SocketClient::TcpClient(const std::string &serverAddr, int serverPort) { error = connect(sockfd, (sockaddr *)&serv_addr, sizeof(serv_addr)); if (error == ECONNREFUSED) { LOG(WARNING) << "connection refused by pserver, try again!"; - if (retry_second++ >= FLAGS_connrefused_retries_second) { + if (retry_second++ >= 7) { LOG(FATAL) << "connection refused by pserver, maybe pserver failed!"; } std::this_thread::sleep_for(std::chrono::seconds(1)); -- GitLab