Remove FD from the event loop in destroy_client, not in stop_client
This commit is contained in:
@@ -10,7 +10,7 @@ void osd_messenger_t::read_requests()
|
||||
int peer_fd = read_ready_clients[i];
|
||||
auto cl_it = clients.find(peer_fd);
|
||||
if (cl_it == clients.end() || !cl_it->second || cl_it->second->read_msg.msg_iovlen ||
|
||||
cl_it->second->peer_state == PEER_RDMA || cl_it->second->peer_state == PEER_RDMA_CONNECTING)
|
||||
cl_it->second->peer_state != PEER_CONNECTED)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ bool osd_messenger_t::handle_read(int result, osd_client_t *cl)
|
||||
{
|
||||
if (cl->refs <= 0)
|
||||
{
|
||||
delete cl;
|
||||
destroy_client(cl);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user