]> git.kaiwu.me - njs.git/commit
Modules: fixed promise events handling.
authorAlexander Borisov <alexander.borisov@nginx.com>
Thu, 26 Nov 2020 18:43:17 +0000 (21:43 +0300)
committerAlexander Borisov <alexander.borisov@nginx.com>
Thu, 26 Nov 2020 18:43:17 +0000 (21:43 +0300)
commiteb24b770caf868b5892f05080d07c8843ef134ae
treef406db8abc2960dc0bbd7522434f1be633a46cf2
parent630764af9f128b0f6b3bf440276733b8d960e9c7
Modules: fixed promise events handling.

Previously, promise chain might not be invoked at all in some cases.
Specifically, this happened in HTTP module if promise chain did not start
with a r.subrequest() invocation.

The fix is to always process all pending promise events after the main module
function.

This closes #359 issue on GitHub.
nginx/ngx_js.c
src/njs_vm.c