1
0
mirror of https://github.com/moparisthebest/spdylay synced 2024-08-13 17:03:54 -04:00

shrpx: Added --backend-keep-alive-timeout option

This commit is contained in:
Tatsuhiro Tsujikawa 2012-07-26 23:08:51 +09:00
parent 17802de7f7
commit f89112b5e9

View File

@ -373,6 +373,10 @@ void print_help(std::ostream& out)
<< " Specify write timeout for backend\n" << " Specify write timeout for backend\n"
<< " connection. Default: " << " connection. Default: "
<< get_config()->downstream_write_timeout.tv_sec << "\n" << get_config()->downstream_write_timeout.tv_sec << "\n"
<< " --backend-keep-alive-timeout=<SEC>\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" << " --accesslog Print simple accesslog to stderr.\n"
<< " -h, --help Print this help.\n" << " -h, --help Print this help.\n"
<< std::endl; << std::endl;
@ -407,6 +411,7 @@ int main(int argc, char **argv)
{"backend-read-timeout", required_argument, &flag, 5 }, {"backend-read-timeout", required_argument, &flag, 5 },
{"backend-write-timeout", required_argument, &flag, 6 }, {"backend-write-timeout", required_argument, &flag, 6 },
{"accesslog", no_argument, &flag, 7 }, {"accesslog", no_argument, &flag, 7 },
{"backend-keep-alive-timeout", required_argument, &flag, 8 },
{"help", no_argument, 0, 'h' }, {"help", no_argument, 0, 'h' },
{0, 0, 0, 0 } {0, 0, 0, 0 }
}; };
@ -497,6 +502,12 @@ int main(int argc, char **argv)
case 7: case 7:
mod_config()->accesslog = true; mod_config()->accesslog = true;
break; break;
case 8: {
// --backend-keep-alive-timeout
timeval tv = {strtol(optarg, 0, 10), 0};
mod_config()->downstream_idle_read_timeout = tv;
break;
}
default: default:
break; break;
} }