]> git.kaiwu.me - njs.git/commitdiff
Stream: marking incoming chain as processed.
authorDmitry Volyntsev <xeioex@nginx.com>
Mon, 29 Oct 2018 14:36:43 +0000 (17:36 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Mon, 29 Oct 2018 14:36:43 +0000 (17:36 +0300)
Previously, the buffers of proxy module were not reclaimed.
This resulted in stopping the processing of new data chunks from
a client after proxy_buffer_size bytes were received.

nginx/ngx_stream_js_module.c

index 3981c7b3c4b78dfd3e745b3ce403018092de2a82..7526bc18187d674bc7b1c803c3f74ccb3ee583ed 100644 (file)
@@ -570,6 +570,8 @@ ngx_stream_js_body_filter(ngx_stream_session_t *s, ngx_chain_t *in,
                 goto exception;
             }
 
+            ctx->buf->pos = ctx->buf->last;
+
         } else {
             cl = ngx_alloc_chain_link(c->pool);
             if (cl == NULL) {