diff options
Diffstat (limited to 'src/stream/ngx_stream_handler.c')
-rw-r--r-- | src/stream/ngx_stream_handler.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/stream/ngx_stream_handler.c b/src/stream/ngx_stream_handler.c index e4538b241..7b635fa4c 100644 --- a/src/stream/ngx_stream_handler.c +++ b/src/stream/ngx_stream_handler.c @@ -147,6 +147,15 @@ ngx_stream_init_connection(ngx_connection_t *c) cmcf = ngx_stream_get_module_main_conf(s, ngx_stream_core_module); + if (cmcf->limit_conn_handler) { + rc = cmcf->limit_conn_handler(s); + + if (rc != NGX_DECLINED) { + ngx_stream_close_connection(c); + return; + } + } + if (cmcf->access_handler) { rc = cmcf->access_handler(s); |