]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/asyc/rmda: fix the bug of assert when Infiniband::recv_msg receives 17688/head
authorJin Cai <caijin.caij@alibaba-inc.com>
Wed, 13 Sep 2017 02:32:08 +0000 (10:32 +0800)
committerJin Cai <caijin.caij@alibaba-inc.com>
Wed, 13 Sep 2017 02:37:23 +0000 (10:37 +0800)
disconnect message

Signed-off-by: Jin Cai <caijin.caij@alibaba-inc.com>
src/msg/async/rdma/RDMAConnectedSocketImpl.cc

index 90fc8e5707f8463a90d59ad852c32eb064ca7b92..8f2ac4a59c147480a13555a08d79c075185f53de 100644 (file)
@@ -200,7 +200,7 @@ int RDMAConnectedSocketImpl::try_connect(const entity_addr_t& peer_addr, const S
 void RDMAConnectedSocketImpl::handle_connection() {
   ldout(cct, 20) << __func__ << " QP: " << my_msg.qpn << " tcp_fd: " << tcp_fd << " notify_fd: " << notify_fd << dendl;
   int r = infiniband->recv_msg(cct, tcp_fd, peer_msg);
-  if (r < 0) {
+  if (r <= 0) {
     if (r != -EAGAIN) {
       dispatcher->perf_logger->inc(l_msgr_rdma_handshake_errors);
       ldout(cct, 1) << __func__ << " recv handshake msg failed." << dendl;