HDFS-9749: libhdfs++: RPC engine will attempt to close an asio socket before it's been opened. Contributed by James Clampffer

This commit is contained in:
Bob Hansen 2016-02-03 16:41:59 -05:00 committed by James Clampffer
parent 288a9a9ee7
commit f591b95e08

View File

@ -282,8 +282,10 @@ void RpcConnectionImpl<NextLayer>::Disconnect() {
assert(lock_held(connection_state_lock_)); // Must be holding lock before calling assert(lock_held(connection_state_lock_)); // Must be holding lock before calling
request_over_the_wire_.reset(); request_over_the_wire_.reset();
next_layer_.cancel(); if (connected_) {
next_layer_.close(); next_layer_.cancel();
next_layer_.close();
}
connected_ = false; connected_ = false;
} }
} }