Fix unused variable warning on mac
This commit is contained in:
parent
061c2f0f6f
commit
e3b6d0c3cb
1 changed files with 1 additions and 1 deletions
|
@ -95,9 +95,9 @@ void server_base::accept_connection(boost::asio::ip::tcp::acceptor& acceptor, co
|
|||
#ifndef _WIN32
|
||||
if(keep_alive_) {
|
||||
int timeout = 30;
|
||||
#ifdef __linux__
|
||||
int cnt = 10;
|
||||
int interval = 30;
|
||||
#ifdef __linux__
|
||||
setsockopt(socket->native_handle(), SOL_TCP, TCP_KEEPIDLE, &timeout, sizeof(timeout));
|
||||
setsockopt(socket->native_handle(), SOL_TCP, TCP_KEEPCNT, &cnt, sizeof(cnt));
|
||||
setsockopt(socket->native_handle(), SOL_TCP, TCP_KEEPINTVL, &interval, sizeof(interval));
|
||||
|
|
Loading…
Add table
Reference in a new issue