aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2021-11-18 14:33:21 +0300
committerVladimir Homutov <vl@nginx.com>2021-11-18 14:33:21 +0300
commit0de6a1ebb48c13e658b0e94be1a3045a725c4624 (patch)
treeca572b1bd2e23e50d1bd668018e6fcf4b922c563 /src
parent82b4912a8ebbbff46a70c0186bde0a0e6cfdab2c (diff)
downloadnginx-0de6a1ebb48c13e658b0e94be1a3045a725c4624.tar.gz
nginx-0de6a1ebb48c13e658b0e94be1a3045a725c4624.zip
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).
Diffstat (limited to 'src')
-rw-r--r--src/event/quic/ngx_event_quic_socket.c6
1 files changed, 0 insertions, 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);