Set linux interval+count to something better for clients.
This commit is contained in:
parent
9b3fab1583
commit
2b868b4a2b
1 changed files with 2 additions and 2 deletions
|
@ -559,8 +559,8 @@ void wesnothd_connection::set_keepalive(int seconds)
|
|||
utils::get<raw_socket>(socket_)->set_option(option);
|
||||
|
||||
#ifdef __linux__
|
||||
int cnt = 10;
|
||||
int interval = 30;
|
||||
int cnt = 5;
|
||||
int interval = 1;
|
||||
setsockopt(utils::get<raw_socket>(socket_)->native_handle(), SOL_TCP, TCP_KEEPIDLE, &seconds, sizeof(seconds));
|
||||
setsockopt(utils::get<raw_socket>(socket_)->native_handle(), SOL_TCP, TCP_KEEPCNT, &cnt, sizeof(cnt));
|
||||
setsockopt(utils::get<raw_socket>(socket_)->native_handle(), SOL_TCP, TCP_KEEPINTVL, &interval, sizeof(interval));
|
||||
|
|
Loading…
Add table
Reference in a new issue