Skip to content
Snippets Groups Projects
Commit ad59253e authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman
Browse files

server/tcp: read conf consistently

parent 4519c5b1
No related branches found
No related tags found
1 merge request!1312Conf singleton proper access
......@@ -69,10 +69,11 @@ static void update_sweep_timer(struct timespec *timer)
static void update_tcp_conf(tcp_context_t *tcp)
{
rcu_read_lock();
conf_t *pconf = conf();
tcp->max_worker_fds = tcp->client_threshold + \
MAX(conf()->cache.srv_tcp_max_clients / conf()->cache.srv_tcp_threads, 1);
tcp->idle_timeout = conf()->cache.srv_tcp_idle_timeout;
tcp->io_timeout = conf()->cache.srv_tcp_io_timeout;
MAX(pconf->cache.srv_tcp_max_clients / pconf->cache.srv_tcp_threads, 1);
tcp->idle_timeout = pconf->cache.srv_tcp_idle_timeout;
tcp->io_timeout = pconf->cache.srv_tcp_io_timeout;
rcu_read_unlock();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment