aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2018-02-11 23:20:24 +0000
committerHoward Chu <hyc@symas.com>2018-02-11 23:32:37 +0000
commitf689a77e568f3349118258d97fda3e407dab1be6 (patch)
treef458d6e9ad895bbb0bbc9fa24d1f4b86adda6cd1 /contrib
parentMerge pull request #3198 (diff)
downloadmonero-f689a77e568f3349118258d97fda3e407dab1be6.tar.xz
Fix #602 Turn on socket keepalive
Diffstat (limited to 'contrib')
-rw-r--r--contrib/epee/include/net/abstract_tcp_server2.inl3
1 files changed, 3 insertions, 0 deletions
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<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