]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/rdma: don't need to delete event when tcp connection isn't built 13528/head
authorHaomai Wang <haomai@xsky.com>
Mon, 20 Feb 2017 01:13:05 +0000 (09:13 +0800)
committerHaomai Wang <haomai@xsky.com>
Mon, 20 Feb 2017 01:13:05 +0000 (09:13 +0800)
Signed-off-by: Haomai Wang <haomai@xsky.com>
src/msg/async/rdma/RDMAConnectedSocketImpl.cc

index baa37e7ce53313d72bfb662f1ce9d99181728e25..bb7d55d60cbdb8eb52bc2cd2d59bad2c5dbc03d9 100644 (file)
@@ -528,7 +528,7 @@ void RDMAConnectedSocketImpl::fin() {
 }
 
 void RDMAConnectedSocketImpl::cleanup() {
-  if (con_handler) {
+  if (con_handler && tcp_fd >= 0) {
     (static_cast<C_handle_connection*>(con_handler))->close();
     worker->center.submit_to(worker->center.get_id(), [this]() {
       worker->center.delete_file_event(tcp_fd, EVENT_READABLE);