Change "BUG" short send message to a client disconnection
This commit is contained in:
@@ -326,8 +326,10 @@ void osd_messenger_t::handle_send(int result, bool prev, bool more, osd_client_t
|
|||||||
int expected = cl->send_list.size() < IOV_MAX ? cl->send_list.size() : IOV_MAX;
|
int expected = cl->send_list.size() < IOV_MAX ? cl->send_list.size() : IOV_MAX;
|
||||||
if (done != expected)
|
if (done != expected)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "BUG (maybe kernel): Expected to send %d iovecs with MSG_WAITALL but sent %d\n", expected, done);
|
fprintf(stderr, "Client %d socket write error: expected to send "
|
||||||
exit(1);
|
"%d iovecs with MSG_WAITALL but sent %d. Disconnecting client\n", cl->peer_fd, expected, done);
|
||||||
|
stop_client(cl->peer_fd);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
cl->zc_free_list.push_back(NULL); // end marker
|
cl->zc_free_list.push_back(NULL); // end marker
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,6 +158,13 @@ osd_client_t::~osd_client_t()
|
|||||||
}
|
}
|
||||||
// Cancel outbound ops
|
// Cancel outbound ops
|
||||||
cancel_ops();
|
cancel_ops();
|
||||||
|
for (osd_op_t *op: zc_free_list)
|
||||||
|
{
|
||||||
|
if (op)
|
||||||
|
{
|
||||||
|
delete op;
|
||||||
|
}
|
||||||
|
}
|
||||||
#ifndef __MOCK__
|
#ifndef __MOCK__
|
||||||
#ifdef WITH_RDMA
|
#ifdef WITH_RDMA
|
||||||
if (rdma_conn)
|
if (rdma_conn)
|
||||||
|
|||||||
Reference in New Issue
Block a user