changeset 8216:0aec63f50c29 quic

Added check for initialized c->ssl before calling SSL shutdown.
author Vladimir Homutov <vl@nginx.com>
date Fri, 13 Mar 2020 18:55:58 +0300
parents 38c0898b6df7
children a5a1b3fad834
files src/event/ngx_event_quic.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -478,7 +478,9 @@ ngx_quic_close_connection(ngx_connection
     ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
                    "close quic connection: %d", c->fd);
 
-    (void) ngx_ssl_shutdown(c);
+    if (c->ssl) {
+        (void) ngx_ssl_shutdown(c);
+    }
 
 #if (NGX_STAT_STUB)
     (void) ngx_atomic_fetch_add(ngx_stat_active, -1);