[PATCH 6 of 8] Disabled freeing recv buffer when asynchronous recv IO is in running
SoYun Seong
thdbsdox12 at gmail.com
Tue Nov 24 08:43:34 UTC 2020
# HG changeset patch
# User SoYun Seong <thdbsdox12 at gmail.com>
# Date 1606129149 0
# Mon Nov 23 10:59:09 2020 +0000
# Node ID 57e46378828172e06b32b11d4c059ff0a7213d0d
# Parent bdf6d23007d53d9b76a7666c8db7ece864e31038
Disabled freeing recv buffer when asynchronous recv IO is in running.
diff -r bdf6d23007d5 -r 57e463788281 src/http/ngx_http_request.c
--- a/src/http/ngx_http_request.c Mon Nov 23 10:56:29 2020 +0000
+++ b/src/http/ngx_http_request.c Mon Nov 23 10:59:09 2020 +0000
@@ -444,8 +444,10 @@
* We are trying to not hold c->buffer's memory for an idle connection.
*/
- if (ngx_pfree(c->pool, b->start) == NGX_OK) {
- b->start = NULL;
+ if(!(ngx_event_flags & NGX_USE_URING_EVENT)) {
+ if (ngx_pfree(c->pool, b->start) == NGX_OK) {
+ b->start = NULL;
+ }
}
return;
@@ -3317,13 +3319,15 @@
* c->buffer's memory for a keepalive connection.
*/
- if (ngx_pfree(c->pool, b->start) == NGX_OK) {
-
- /*
- * the special note that c->buffer's memory was freed
- */
-
- b->pos = NULL;
+ if(!(ngx_event_flags & NGX_USE_URING_EVENT)) {
+ if (ngx_pfree(c->pool, b->start) == NGX_OK) {
+
+ /*
+ * the special note that c->buffer's memory was freed
+ */
+
+ b->pos = NULL;
+ }
}
return;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx-6.patch
Type: text/x-patch
Size: 1476 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20201124/a2b6e20b/attachment-0001.bin>
More information about the nginx-devel
mailing list