From f689a77e568f3349118258d97fda3e407dab1be6 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 11 Feb 2018 23:20:24 +0000 Subject: Fix #602 Turn on socket keepalive --- contrib/epee/include/net/abstract_tcp_server2.inl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/epee/include/net/abstract_tcp_server2.inl b/contrib/epee/include/net/abstract_tcp_server2.inl index 870f6c2b2..5a886688b 100644 --- a/contrib/epee/include/net/abstract_tcp_server2.inl +++ b/contrib/epee/include/net/abstract_tcp_server2.inl @@ -935,6 +935,9 @@ POP_WARNINGS boost::bind(&boosted_tcp_server::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 -- cgit v1.2.3