Commit 1f5e4d04 authored by Marek Vavrusa's avatar Marek Vavrusa

daemon/worker: fix outbound TCP queries

previously the buffer for TCP pkt reassembly was
not correctly cleared and fragmented answers
were rejected 
parent db544c62
......@@ -395,6 +395,13 @@ static int qr_task_on_send(struct qr_task *task, uv_handle_t *handle, int status
{
if (!task->finished) {
if (status == 0 && handle) {
/* For TCP we can be sure there will be no retransmit, so we flush
* the packet buffer so it can be reused again for reassembly. */
if (handle->type == UV_TCP) {
knot_pkt_t *pktbuf = task->pktbuf;
knot_pkt_clear(pktbuf);
pktbuf->size = 0;
}
io_start_read(handle); /* Start reading new query */
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment