diff src/http/modules/perl/nginx.xs @ 6960:1c5e5e5b008d

Perl: fixed delaying subrequests. Much like in limit_req, use the wev->delayed flag to ensure proper handling and interoperability with limit_rate.
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 02 Apr 2017 14:32:28 +0300
parents c6cc0b79a43d
children 0cdee26605f3
line wrap: on
line diff
--- a/src/http/modules/perl/nginx.xs
+++ b/src/http/modules/perl/nginx.xs
@@ -1001,6 +1001,7 @@ sleep(r, sleep, next)
 
     ctx->next = SvRV(ST(2));
 
+    r->connection->write->delayed = 1;
     ngx_add_timer(r->connection->write, sleep);
 
     r->write_event_handler = ngx_http_perl_sleep_handler;