You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by bo...@apache.org on 2016/02/04 14:10:50 UTC
[4/4] hadoop git commit: HDFS-9749: libhdfs++: RPC engine will
attempt to close an asio socket before it's been opened. Contributed by James
Clampffer
HDFS-9749: libhdfs++: RPC engine will attempt to close an asio socket before it's been opened. Contributed by James Clampffer
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/50817dc4
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/50817dc4
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/50817dc4
Branch: refs/heads/HDFS-8707
Commit: 50817dc4ceecfe49789dc9718ef1dcaf80197b52
Parents: 038e01f
Author: Bob Hansen <bo...@hp.com>
Authored: Wed Feb 3 16:41:59 2016 -0500
Committer: Bob Hansen <bo...@hp.com>
Committed: Wed Feb 3 16:41:59 2016 -0500
----------------------------------------------------------------------
.../src/main/native/libhdfspp/lib/rpc/rpc_connection.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/50817dc4/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
index 61d62e9..a8820c2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
@@ -282,8 +282,10 @@ void RpcConnectionImpl<NextLayer>::Disconnect() {
assert(lock_held(connection_state_lock_)); // Must be holding lock before calling
request_over_the_wire_.reset();
- next_layer_.cancel();
- next_layer_.close();
+ if (connected_) {
+ next_layer_.cancel();
+ next_layer_.close();
+ }
connected_ = false;
}
}