]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
worker: fixed infinite loop on send failure
authorMarek Vavruša <mvavrusa@cloudflare.com>
Sat, 14 Apr 2018 04:18:42 +0000 (21:18 -0700)
committerMarek Vavruša <mvavrusa@cloudflare.com>
Sat, 14 Apr 2018 04:22:25 +0000 (21:22 -0700)
commit90f72d63644ad8a7639e9e2dfa2f1e2249131995
tree98bc69bd81e3bfacfd94808c82b672732017b775
parentf744757cd1189217aec397416d95f5de41d524fa
worker: fixed infinite loop on send failure

The problem here is when qr_task_send() returns an error, the
following error handler will attempt to cancel all tasks that were
started on the same connection, but that will only work for the first
task (which is finished), the qr_task_on_send() will have no effect
on tasks in progress as the passed handle is NULL, and the task->finished
is false, thus looping infinitely.

The solution here is to let the rest of the tasks complete, even though
sending answer back will fail (which is fine).
daemon/worker.c