HDFS-9687. libhdfs++: potential segfault after teardown. Contributed by Bob Hansen.
This commit is contained in:
parent
1017ccabeb
commit
5cd2a1766c
|
@ -205,8 +205,9 @@ void RpcConnectionImpl<NextLayer>::FlushPendingRequests() {
|
||||||
|
|
||||||
req->timer().expires_from_now(
|
req->timer().expires_from_now(
|
||||||
std::chrono::milliseconds(options_.rpc_timeout));
|
std::chrono::milliseconds(options_.rpc_timeout));
|
||||||
req->timer().async_wait(std::bind(
|
req->timer().async_wait([shared_this, this, req](const ::asio::error_code &ec) {
|
||||||
&RpcConnection::HandleRpcTimeout, this, req, _1));
|
this->HandleRpcTimeout(req, ec);
|
||||||
|
});
|
||||||
|
|
||||||
asio::async_write(next_layer_, asio::buffer(*payload),
|
asio::async_write(next_layer_, asio::buffer(*payload),
|
||||||
[shared_this, this, payload](const ::asio::error_code &ec,
|
[shared_this, this, payload](const ::asio::error_code &ec,
|
||||||
|
|
Loading…
Reference in New Issue