Wrap delete rdma_conn into destroy_rdma_conn

This commit is contained in:
Vitaliy Filippov
2026-05-18 01:17:56 +03:00
parent 648e3b12f0
commit ad24be717a
4 changed files with 25 additions and 26 deletions
+13
View File
@@ -794,3 +794,16 @@ void osd_messenger_t::handle_rdma_events(msgr_rdma_context_t *rdma_context)
} while (event_count > 0);
handle_immediate_ops();
}
void osd_messenger_t::destroy_rdma_conn(msgr_rdma_connection_t *rdma_conn)
{
if (rdma_conn->cmid)
{
auto rdma_it = rdmacm_connections.find(rdma_conn->cmid);
if (rdma_it != rdmacm_connections.end() && rdma_it->second->rdma_conn == rdma_conn)
{
rdmacm_connections.erase(rdma_it);
}
}
delete rdma_conn;
}