]> git.kaiwu.me - nginx.git/commitdiff
Assign connection number to every QUIC stream log.
authorRoman Arutyunyan <arut@nginx.com>
Thu, 23 Apr 2020 15:05:05 +0000 (18:05 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Thu, 23 Apr 2020 15:05:05 +0000 (18:05 +0300)
src/event/ngx_event_quic.c
src/http/ngx_http_request.c
src/http/v3/ngx_http_v3_streams.c

index 78af3559f4ddac11606da91ecc6cfa06aaf8f20c..ef8e237d2c13b529e3fdb5e6e1fc090fd925d75d 100644 (file)
@@ -2778,6 +2778,8 @@ ngx_quic_create_stream(ngx_connection_t *c, uint64_t id, size_t rcvbuf_size)
     sn->c->read->log = c->log;
     sn->c->write->log = c->log;
 
+    log->connection = sn->c->number;
+
     cln = ngx_pool_cleanup_add(pool, 0);
     if (cln == NULL) {
         ngx_close_connection(sn->c);
index 082938e00d730004e309e8556b086c02612e6b6d..b0cc9a54338c5c1384a0013f57d3d482ea9b8012 100644 (file)
@@ -438,7 +438,6 @@ ngx_http_quic_stream_handler(ngx_connection_t *c)
     ctx->request = NULL;
     ctx->current_request = NULL;
 
-    c->log->connection = c->number;
     c->log->handler = ngx_http_log_error;
     c->log->data = ctx;
     c->log->action = "waiting for request";
index 6078725d7af43720977fcd57857b1327d655ebcf..165f21fdc8c2914d84217be446ab3d706a0b556e 100644 (file)
@@ -34,8 +34,6 @@ ngx_http_v3_handle_client_uni_stream(ngx_connection_t *c)
 {
     ngx_http_v3_uni_stream_t  *us;
 
-    c->log->connection = c->number;
-
     ngx_http_v3_get_uni_stream(c, NGX_HTTP_V3_STREAM_CONTROL);
     ngx_http_v3_get_uni_stream(c, NGX_HTTP_V3_STREAM_ENCODER);
     ngx_http_v3_get_uni_stream(c, NGX_HTTP_V3_STREAM_DECODER);