diff options
author | Dmitry Volyntsev <xeioex@nginx.com> | 2022-08-23 19:36:16 -0700 |
---|---|---|
committer | Dmitry Volyntsev <xeioex@nginx.com> | 2022-08-23 19:36:16 -0700 |
commit | 569292e0a74f2b1ec09566f3329f82bdd0d58e87 (patch) | |
tree | e97eddef237807acffe05d430fe7c2b8e12469e4 /nginx/ngx_js.c | |
parent | 399580ff3bb1f1a5f584afb6bf7fc42d2f90a6d8 (diff) | |
download | njs-569292e0a74f2b1ec09566f3329f82bdd0d58e87.tar.gz njs-569292e0a74f2b1ec09566f3329f82bdd0d58e87.zip |
Stream: improved s.send() with async callbacks.
Previously, s.send() was a context dependant method because the
direction it was sending data to was determined by a callback (upstream
or downstream) it was called from. This works for synchronous
callbacks it was originally designed, but fails with async functions
(e.g. ngx.fetch()).
The fix is to store the direction data was going to as a separate flag
which can be used by s.send().
Diffstat (limited to 'nginx/ngx_js.c')
0 files changed, 0 insertions, 0 deletions