mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 04:29:02 -04:00
Fix typo in configuration option worker_accept_treshold.
There is no backwards comptabile option available. Fixes #53
This commit is contained in:
parent
5f48a03703
commit
5228fe1cbc
@ -30,7 +30,7 @@ workers 4
|
||||
# how new connections are spread across worker processes.
|
||||
#
|
||||
# This is disabled by default.
|
||||
#worker_accept_treshold 0
|
||||
#worker_accept_threshold 0
|
||||
|
||||
# Workers bind themselves to a single CPU by default.
|
||||
# Turn this off by setting this option to 0
|
||||
|
@ -377,7 +377,7 @@ extern u_int8_t worker_set_affinity;
|
||||
extern u_int32_t worker_rlimit_nofiles;
|
||||
extern u_int32_t worker_max_connections;
|
||||
extern u_int32_t worker_active_connections;
|
||||
extern u_int32_t worker_accept_treshold;
|
||||
extern u_int32_t worker_accept_threshold;
|
||||
extern u_int64_t kore_websocket_maxframe;
|
||||
extern u_int64_t kore_websocket_timeout;
|
||||
extern u_int32_t kore_socket_backlog;
|
||||
|
@ -148,8 +148,8 @@ kore_platform_event_wait(u_int64_t timer)
|
||||
|
||||
while (worker_active_connections <
|
||||
worker_max_connections) {
|
||||
if (worker_accept_treshold != 0 &&
|
||||
r >= worker_accept_treshold)
|
||||
if (worker_accept_threshold != 0 &&
|
||||
r >= worker_accept_threshold)
|
||||
break;
|
||||
|
||||
if (!kore_connection_accept(l, &c)) {
|
||||
|
10
src/config.c
10
src/config.c
@ -44,7 +44,7 @@ static int configure_certfile(char **);
|
||||
static int configure_certkey(char **);
|
||||
static int configure_rlimit_nofiles(char **);
|
||||
static int configure_max_connections(char **);
|
||||
static int configure_accept_treshold(char **);
|
||||
static int configure_accept_threshold(char **);
|
||||
static int configure_set_affinity(char **);
|
||||
static int configure_tls_version(char **);
|
||||
static int configure_tls_cipher(char **);
|
||||
@ -94,7 +94,7 @@ static struct {
|
||||
{ "workers", configure_workers },
|
||||
{ "worker_max_connections", configure_max_connections },
|
||||
{ "worker_rlimit_nofiles", configure_rlimit_nofiles },
|
||||
{ "worker_accept_treshold", configure_accept_treshold },
|
||||
{ "worker_accept_threshold", configure_accept_threshold },
|
||||
{ "worker_set_affinity", configure_set_affinity },
|
||||
{ "pidfile", configure_pidfile },
|
||||
{ "accesslog", configure_accesslog },
|
||||
@ -600,16 +600,16 @@ configure_rlimit_nofiles(char **argv)
|
||||
}
|
||||
|
||||
static int
|
||||
configure_accept_treshold(char **argv)
|
||||
configure_accept_threshold(char **argv)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (argv[1] == NULL)
|
||||
return (KORE_RESULT_ERROR);
|
||||
|
||||
worker_accept_treshold = kore_strtonum(argv[1], 0, 1, UINT_MAX, &err);
|
||||
worker_accept_threshold = kore_strtonum(argv[1], 0, 1, UINT_MAX, &err);
|
||||
if (err != KORE_RESULT_OK) {
|
||||
printf("bad value for worker_accept_treshold: %s\n", argv[1]);
|
||||
printf("bad value for worker_accept_threshold: %s\n", argv[1]);
|
||||
return (KORE_RESULT_ERROR);
|
||||
}
|
||||
|
||||
|
@ -129,8 +129,8 @@ kore_platform_event_wait(u_int64_t timer)
|
||||
|
||||
while (worker_active_connections <
|
||||
worker_max_connections) {
|
||||
if (worker_accept_treshold != 0 &&
|
||||
r >= worker_accept_treshold)
|
||||
if (worker_accept_threshold != 0 &&
|
||||
r >= worker_accept_threshold)
|
||||
break;
|
||||
|
||||
if (!kore_connection_accept(l, &c)) {
|
||||
|
@ -69,7 +69,7 @@ extern volatile sig_atomic_t sig_recv;
|
||||
struct kore_worker *worker = NULL;
|
||||
struct connection_list worker_clients;
|
||||
u_int8_t worker_set_affinity = 1;
|
||||
u_int32_t worker_accept_treshold = 0;
|
||||
u_int32_t worker_accept_threshold = 0;
|
||||
u_int32_t worker_rlimit_nofiles = 1024;
|
||||
u_int32_t worker_max_connections = 250;
|
||||
u_int32_t worker_active_connections = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user