In case an error provokes the release of the applet, we will never call
the end callback of the httpclient.
In the case of a lua script, it would mean that the lua task will never
be waked up after a yield, letting the lua script stuck forever.
Fix the issue by moving the callback from the end of the iohandler to
the applet release function.
Must be backported in 2.5.
return;
end:
- if (hc->ops.res_end)
- hc->ops.res_end(hc);
si_shutw(si);
si_shutr(si);
return;
* again from the caller */
hc->appctx = NULL;
+ if (hc->ops.res_end)
+ hc->ops.res_end(hc);
/* destroy the httpclient when set to autotokill */
if (hc->flags & HTTPCLIENT_FA_AUTOKILL) {