diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index 4f029fe5b..69ea57a2a 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -1160,10 +1160,10 @@ ngx_ssl_session_cache(ngx_ssl_t *ssl, ngx_str_t *sess_ctx, if (builtin_session_cache != NGX_SSL_DFLT_BUILTIN_SCACHE) { SSL_CTX_sess_set_cache_size(ssl->ctx, builtin_session_cache); } - - SSL_CTX_set_timeout(ssl->ctx, timeout); } + SSL_CTX_set_timeout(ssl->ctx, timeout); + if (shm_zone) { shm_zone->init = ngx_ssl_session_cache_init;