Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
QUIC: removed unnecessary closing of active/backup sockets.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
vlhomutov authored and morf committed Dec 7, 2021
1 parent a5ba842 commit 8910c69
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/event/quic/ngx_event_quic_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8910c69

Please sign in to comment.