Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Cancel ongoing ngx_http_request_t (no replies)

$
0
0
So I'm continuing to work on my simple timeout module: http://forum.nginx.org/read.php?2,259019

Now, when timer elapses, I want to cancel ongoing http request, here's my timer handler:

static void simple_timeout_handler(ngx_event_t* timeout_event)
{
ngx_http_request_t* request = (ngx_http_request_t*)timeout_event->data;

ngx_log_debug0(NGX_LOG_DEBUG_HTTP, timeout_event->log, 0,
"SIMPLE TIMEOUT TIMER END");

ngx_http_finalize_request(request, NGX_HTTP_REQUEST_TIME_OUT); // this does not seem to work,
// as request stays in progress
}

This does not work as request still continues to be in progress. Is it possible to terminate it immediately, and return http timeout response?

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>