Mercurial > hg > nginx
comparison src/stream/ngx_stream_handler.c @ 6684:9cac11efb205
Stream: realip module.
author | Dmitry Volyntsev <xeioex@nginx.com> |
---|---|
date | Thu, 01 Sep 2016 14:45:33 +0300 |
parents | db422604ceb0 |
children | 56fc55e32f23 |
comparison
equal
deleted
inserted
replaced
6683:b802b7e1d9bc | 6684:9cac11efb205 |
---|---|
294 | 294 |
295 c->log->action = "initializing session"; | 295 c->log->action = "initializing session"; |
296 | 296 |
297 cmcf = ngx_stream_get_module_main_conf(s, ngx_stream_core_module); | 297 cmcf = ngx_stream_get_module_main_conf(s, ngx_stream_core_module); |
298 | 298 |
299 if (cmcf->realip_handler) { | |
300 rc = cmcf->realip_handler(s); | |
301 | |
302 if (rc == NGX_ERROR) { | |
303 ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR); | |
304 return; | |
305 } | |
306 } | |
307 | |
299 if (cmcf->limit_conn_handler) { | 308 if (cmcf->limit_conn_handler) { |
300 rc = cmcf->limit_conn_handler(s); | 309 rc = cmcf->limit_conn_handler(s); |
301 | 310 |
302 if (rc == NGX_ERROR) { | 311 if (rc == NGX_ERROR) { |
303 ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR); | 312 ngx_stream_finalize_session(s, NGX_STREAM_INTERNAL_SERVER_ERROR); |