diff src/event/quic/ngx_event_quic_streams.c @ 8842:486c6a9be111 quic

QUIC: store QUIC connection fd in stream fake connection. Previously it had -1 as fd. This fixes proxying, which relies on downstream connection having a real fd. Also, this reduces diff to the default branch for ngx_close_connection().
author Roman Arutyunyan <arut@nginx.com>
date Mon, 06 Sep 2021 16:59:00 +0300
parents 1f7f98638dc2
children 9ae239d2547d
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_streams.c
+++ b/src/event/quic/ngx_event_quic_streams.c
@@ -440,6 +440,8 @@ ngx_quic_create_stream(ngx_connection_t 
     qs->connection = sc;
 
     sc->quic = qs;
+    sc->fd = c->fd;
+    sc->shared = 1;
     sc->type = SOCK_STREAM;
     sc->pool = pool;
     sc->ssl = c->ssl;