]> git.kaiwu.me - njs.git/commit
QuickJS: fix promise and event leak on proxy URL evaluation failure
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 11 Jun 2026 23:46:43 +0000 (16:46 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Fri, 12 Jun 2026 03:26:59 +0000 (20:26 -0700)
commitabd33656883cde9db4daa5a033d099d60c3380f4
treee6a382a33c4860b1ed6cfea4aedd5fa682ff0237
parentf18625602a54e94ca7d41a1df33446493a6fe242
QuickJS: fix promise and event leak on proxy URL evaluation failure

Previously, when dynamic proxy URL evaluation failed in
ngx_qjs_fetch(), the error was returned directly, bypassing the fail
path which deletes the registered fetch event and releases the
promise.  The njs counterpart already goes through the fail path.

As a side effect, the error is now reported by rejecting the
returned promise instead of throwing synchronously, consistently
with the other failure paths.
nginx/ngx_qjs_fetch.c