Skip to content
Snippets Groups Projects
Commit 0b03632d authored by Marek Vavruša's avatar Marek Vavruša
Browse files

daemon: do not call back when recv-end

parent 3e99e9e1
Branches
Tags
No related merge requests found
......@@ -56,7 +56,9 @@ void udp_recv(uv_udp_t *handle, ssize_t nread, const uv_buf_t *buf,
uv_loop_t *loop = handle->loop;
struct worker_ctx *worker = loop->data;
if (nread <= 0) {
worker_exec(worker, (uv_handle_t *)handle, NULL, addr);
if (nread < 0) { /* Error response, notify resolver */
worker_exec(worker, (uv_handle_t *)handle, NULL, addr);
} /* nread == 0 is for freeing buffers, we don't need to do this */
return;
}
......
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