Fix RDMA connection leak which was preventing stable functioning of RDMA :)

This commit is contained in:
Vitaliy Filippov
2023-11-11 23:40:47 +03:00
parent 12a6bed2d5
commit 7e82573ed0
2 changed files with 17 additions and 2 deletions
+8 -1
View File
@@ -490,7 +490,14 @@ void osd_messenger_t::check_peer_config(osd_client_t *cl)
fprintf(stderr, "Connected to OSD %lu using RDMA\n", cl->osd_num);
}
cl->peer_state = PEER_RDMA;
tfd->set_fd_handler(cl->peer_fd, false, NULL);
tfd->set_fd_handler(cl->peer_fd, false, [this](int peer_fd, int epoll_events)
{
// Do not miss the disconnection!
if (epoll_events & EPOLLRDHUP)
{
handle_peer_epoll(peer_fd, epoll_events);
}
});
// Add the initial receive request
try_recv_rdma(cl);
}