]> git.kaiwu.me - nginx.git/commitdiff
QUIC: simplified stream fd initialization.
authorRoman Arutyunyan <arut@nginx.com>
Tue, 21 Sep 2021 15:25:26 +0000 (18:25 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Tue, 21 Sep 2021 15:25:26 +0000 (18:25 +0300)
src/event/quic/ngx_event_quic_streams.c

index 69c7220cfd176bbdc80071ddd3bb0015d7389173..9473f99b4b321aafb91e87c075242d3f053cef1a 100644 (file)
@@ -431,7 +431,7 @@ ngx_quic_create_stream(ngx_connection_t *c, uint64_t id)
     *log = *c->log;
     pool->log = log;
 
-    sc = ngx_get_connection(-1, log);
+    sc = ngx_get_connection(c->fd, log);
     if (sc == NULL) {
         ngx_destroy_pool(pool);
         return NULL;
@@ -440,7 +440,6 @@ ngx_quic_create_stream(ngx_connection_t *c, uint64_t id)
     qs->connection = sc;
 
     sc->quic = qs;
-    sc->fd = c->fd;
     sc->shared = 1;
     sc->type = SOCK_STREAM;
     sc->pool = pool;