aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_handler.c
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2016-09-05 17:50:16 +0300
committerVladimir Homutov <vl@nginx.com>2016-09-05 17:50:16 +0300
commit68a7b9b5a302cf6c93fb7a8aec64c09b98150146 (patch)
tree432aad2af88726613410727d92b07505f3cbf3c4 /src/stream/ngx_stream_handler.c
parent443b52db591d876a0e10b9ac3406174eb7fdbce1 (diff)
downloadnginx-68a7b9b5a302cf6c93fb7a8aec64c09b98150146.tar.gz
nginx-68a7b9b5a302cf6c93fb7a8aec64c09b98150146.zip
Stream: log module.
Diffstat (limited to 'src/stream/ngx_stream_handler.c')
-rw-r--r--src/stream/ngx_stream_handler.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/stream/ngx_stream_handler.c b/src/stream/ngx_stream_handler.c
index a1b5551d7..49c58c4e0 100644
--- a/src/stream/ngx_stream_handler.c
+++ b/src/stream/ngx_stream_handler.c
@@ -311,11 +311,19 @@ ngx_stream_ssl_handshake_handler(ngx_connection_t *c)
void
ngx_stream_finalize_session(ngx_stream_session_t *s, ngx_uint_t rc)
{
+ ngx_stream_core_main_conf_t *cmcf;
+
ngx_log_debug1(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
"finalize stream session: %i", rc);
s->status = rc;
+ cmcf = ngx_stream_get_module_main_conf(s, ngx_stream_core_module);
+
+ if (cmcf->access_log_handler) {
+ (void) cmcf->access_log_handler(s);
+ }
+
ngx_stream_close_connection(s->connection);
}