Skip to content

Commit d5d974b

Browse files
authored
Merge pull request Qihoo360#94 from smallb/master
fixed connect error code
2 parents 8e808d1 + 7b62888 commit d5d974b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

evpp/udp/sync_udp_client.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ bool Client::Connect() {
5151
int ret = ::connect(sockfd_, addr, addrlen);
5252

5353
if (ret != 0) {
54-
Close();
5554
LOG_ERROR << "Failed to connect to remote "
5655
<< sock::ToIPPort(&remote_addr_)
5756
<< ", errno=" << errno << " " << strerror(errno);
57+
Close();
5858
return false;
5959
}
6060

0 commit comments

Comments
 (0)