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).
This commit is contained in:
Vladimir Homutov 2021-11-18 14:33:21 +03:00
parent 82b4912a8e
commit 0de6a1ebb4

View File

@ -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);