mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-11-02 03:07:49 +00:00
Fixed bug which may happen if additional write buffers are empty but main write buffer not.
* may cause nDPIsrvd to hang indefinitly if no more data received from a collector Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -430,7 +430,13 @@ static int handle_outgoing_data(int epollfd, struct remote_desc * const remote)
|
|||||||
}
|
}
|
||||||
if (utarray_len(additional_write_buffers) == 0)
|
if (utarray_len(additional_write_buffers) == 0)
|
||||||
{
|
{
|
||||||
return del_out_event(epollfd, remote);
|
struct nDPIsrvd_write_buffer * const write_buffer = get_write_buffer(remote);
|
||||||
|
|
||||||
|
if (write_buffer->buf.used == 0) {
|
||||||
|
return del_out_event(epollfd, remote);
|
||||||
|
} else {
|
||||||
|
return drain_main_buffer(remote);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user