From 0de6a1ebb48c13e658b0e94be1a3045a725c4624 Mon Sep 17 00:00:00 2001 From: Vladimir Homutov Date: Thu, 18 Nov 2021 14:33:21 +0300 Subject: [PATCH] QUIC: removed unnecessary closing of active/backup sockets. All open sockets are stored in a queue. There is no need to close some of them separately. If it happens that active and backup point to same socket, double close may happen (leading to possible segfault). --- src/event/quic/ngx_event_quic_socket.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/event/quic/ngx_event_quic_socket.c b/src/event/quic/ngx_event_quic_socket.c index 3b507fca8..4a9fb232d 100644 --- a/src/event/quic/ngx_event_quic_socket.c +++ b/src/event/quic/ngx_event_quic_socket.c @@ -288,12 +288,6 @@ ngx_quic_close_sockets(ngx_connection_t *c) qc = ngx_quic_get_connection(c); - ngx_quic_close_socket(c, qc->socket); - - if (qc->backup) { - ngx_quic_close_socket(c, qc->backup); - } - while (!ngx_queue_empty(&qc->sockets)) { q = ngx_queue_head(&qc->sockets); qsock = ngx_queue_data(q, ngx_quic_socket_t, queue);