From f89112b5e96879687e486e490ca08962f190b708 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 26 Jul 2012 23:08:51 +0900 Subject: [PATCH] shrpx: Added --backend-keep-alive-timeout option --- examples/shrpx.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/shrpx.cc b/examples/shrpx.cc index 0c72b80..c3c3d40 100644 --- a/examples/shrpx.cc +++ b/examples/shrpx.cc @@ -373,6 +373,10 @@ void print_help(std::ostream& out) << " Specify write timeout for backend\n" << " connection. Default: " << get_config()->downstream_write_timeout.tv_sec << "\n" + << " --backend-keep-alive-timeout=\n" + << " Specify keep-alive timeout for backend\n" + << " connection. Default: " + << get_config()->downstream_idle_read_timeout.tv_sec << "\n" << " --accesslog Print simple accesslog to stderr.\n" << " -h, --help Print this help.\n" << std::endl; @@ -407,6 +411,7 @@ int main(int argc, char **argv) {"backend-read-timeout", required_argument, &flag, 5 }, {"backend-write-timeout", required_argument, &flag, 6 }, {"accesslog", no_argument, &flag, 7 }, + {"backend-keep-alive-timeout", required_argument, &flag, 8 }, {"help", no_argument, 0, 'h' }, {0, 0, 0, 0 } }; @@ -497,6 +502,12 @@ int main(int argc, char **argv) case 7: mod_config()->accesslog = true; break; + case 8: { + // --backend-keep-alive-timeout + timeval tv = {strtol(optarg, 0, 10), 0}; + mod_config()->downstream_idle_read_timeout = tv; + break; + } default: break; }