nghttpx: Simpler
This commit is contained in:
parent
b647a7c5b7
commit
373be22d7e
|
@ -2426,16 +2426,8 @@ int parse_config(Config *config, int optid, const StringRef &opt,
|
||||||
config->logging.error.syslog = util::strieq_l("yes", optarg);
|
config->logging.error.syslog = util::strieq_l("yes", optarg);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
case SHRPX_OPTID_FASTOPEN: {
|
case SHRPX_OPTID_FASTOPEN:
|
||||||
int n;
|
return parse_uint(&config->conn.listener.fastopen, opt, optarg);
|
||||||
if (parse_uint(&n, opt, optarg) != 0) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
config->conn.listener.fastopen = n;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
case SHRPX_OPTID_BACKEND_KEEP_ALIVE_TIMEOUT:
|
case SHRPX_OPTID_BACKEND_KEEP_ALIVE_TIMEOUT:
|
||||||
return parse_duration(&config->conn.downstream->timeout.idle_read, opt,
|
return parse_duration(&config->conn.downstream->timeout.idle_read, opt,
|
||||||
optarg);
|
optarg);
|
||||||
|
@ -2622,16 +2614,8 @@ int parse_config(Config *config, int optid, const StringRef &opt,
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case SHRPX_OPTID_BACKLOG: {
|
case SHRPX_OPTID_BACKLOG:
|
||||||
int n;
|
return parse_uint(&config->conn.listener.backlog, opt, optarg);
|
||||||
if (parse_uint(&n, opt, optarg) != 0) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
config->conn.listener.backlog = n;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
case SHRPX_OPTID_CIPHERS:
|
case SHRPX_OPTID_CIPHERS:
|
||||||
config->tls.ciphers = make_string_ref(config->balloc, optarg);
|
config->tls.ciphers = make_string_ref(config->balloc, optarg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue