aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/ngx_stream_handler.c')
-rw-r--r--src/stream/ngx_stream_handler.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stream/ngx_stream_handler.c b/src/stream/ngx_stream_handler.c
index 6e2ed82dc..1c5dc6b62 100644
--- a/src/stream/ngx_stream_handler.c
+++ b/src/stream/ngx_stream_handler.c
@@ -134,6 +134,10 @@ ngx_stream_init_connection(ngx_connection_t *c)
s->ssl = addr_conf->ssl;
#endif
+ if (c->buffer) {
+ s->received += c->buffer->last - c->buffer->pos;
+ }
+
s->connection = c;
c->data = s;