Fix #602 Turn on socket keepalive

This commit is contained in:
Howard Chu 2018-02-11 23:20:24 +00:00
parent ed67e5c001
commit f689a77e56
No known key found for this signature in database
GPG Key ID: FD2A70B44AB11BA7
1 changed files with 3 additions and 0 deletions

View File

@ -935,6 +935,9 @@ POP_WARNINGS
boost::bind(&boosted_tcp_server<t_protocol_handler>::handle_accept, this,
boost::asio::placeholders::error));
boost::asio::socket_base::keep_alive opt(true);
conn->socket().set_option(opt);
conn->start(true, 1 < m_threads_count);
conn->save_dbg_log();
}else