kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/2] kudu git commit: reactor: Minor tidy cleanup
Date Fri, 30 Sep 2016 20:43:28 GMT
reactor: Minor tidy cleanup

No functional changes

Change-Id: I27419e064e071995b4895e25e737b5acd610ec60
Reviewed-on: http://gerrit.cloudera.org:8080/4573
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <adar@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/41e0b0af
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/41e0b0af
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/41e0b0af

Branch: refs/heads/master
Commit: 41e0b0af23aadbca5a38dca8ccf8d42ac7eb5bee
Parents: 4046066
Author: Mike Percy <mpercy@apache.org>
Authored: Thu Sep 29 13:16:37 2016 +0100
Committer: Adar Dembo <adar@cloudera.com>
Committed: Fri Sep 30 20:00:48 2016 +0000

----------------------------------------------------------------------
 src/kudu/rpc/reactor.cc | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/41e0b0af/src/kudu/rpc/reactor.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/reactor.cc b/src/kudu/rpc/reactor.cc
index 78f63d9..19a3dde 100644
--- a/src/kudu/rpc/reactor.cc
+++ b/src/kudu/rpc/reactor.cc
@@ -399,20 +399,19 @@ Status ReactorThread::StartConnect(Socket *sock, const Sockaddr &remote,
bool *i
   if (ret.ok()) {
     VLOG(3) << "StartConnect: connect finished immediately for " << remote.ToString();
     *in_progress = false; // connect() finished immediately.
-    return ret;
+    return Status::OK();
   }
 
   int posix_code = ret.posix_code();
-  if (Socket::IsTemporarySocketError(posix_code) || (posix_code == EINPROGRESS)) {
-    // The connect operation is in progress.
-    *in_progress = true;
+  if (Socket::IsTemporarySocketError(posix_code) || posix_code == EINPROGRESS) {
     VLOG(3) << "StartConnect: connect in progress for " << remote.ToString();
+    *in_progress = true; // The connect operation is in progress.
     return Status::OK();
-  } else {
-    LOG(WARNING) << "failed to create an outbound connection to " << remote.ToString()
-                 << " because connect failed: " << ret.ToString();
-    return ret;
   }
+
+  LOG(WARNING) << "Failed to create an outbound connection to " << remote.ToString()
+               << " because connect() failed: " << ret.ToString();
+  return ret;
 }
 
 void ReactorThread::DestroyConnection(Connection *conn,


Mime
View raw message