Repository: hadoop
Updated Branches:
  refs/heads/HDFS-8707 b1fbec12f -> 011e79c83


HDFS-9687. libhdfs++: potential segfault after teardown.  Contributed by Bob 
Hansen.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/011e79c8
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/011e79c8
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/011e79c8

Branch: refs/heads/HDFS-8707
Commit: 011e79c8341e82db9b453101bfde06abd4f37797
Parents: b1fbec1
Author: James <[email protected]>
Authored: Sat Jan 23 23:37:42 2016 -0500
Committer: James <[email protected]>
Committed: Sat Jan 23 23:37:42 2016 -0500

----------------------------------------------------------------------
 .../src/main/native/libhdfspp/lib/rpc/rpc_connection.h          | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/011e79c8/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 26946bc..61d62e9 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
@@ -205,8 +205,9 @@ void RpcConnectionImpl<NextLayer>::FlushPendingRequests() {
 
     req->timer().expires_from_now(
         std::chrono::milliseconds(options_.rpc_timeout));
-    req->timer().async_wait(std::bind(
-      &RpcConnection::HandleRpcTimeout, this, req, _1));
+    req->timer().async_wait([shared_this, this, req](const ::asio::error_code 
&ec) {
+        this->HandleRpcTimeout(req, ec);
+    });
 
     asio::async_write(next_layer_, asio::buffer(*payload),
                       [shared_this, this, payload](const ::asio::error_code 
&ec,

Reply via email to