aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-02-16 14:24:30 +0100
committerRiccardo Spagni <ric@spagni.net>2018-02-16 14:24:30 +0100
commit64fabf2eb790a8a3e675f55757fc50a069ef0eea (patch)
tree5af538b5d5fccc68d7a40d0abc6e9e258e49ed0e /contrib/epee/include/net
parentMerge pull request #3248 (diff)
parentFix #602 Turn on socket keepalive (diff)
downloadmonero-64fabf2eb790a8a3e675f55757fc50a069ef0eea.tar.xz
Merge pull request #3252
f689a77e Fix #602 Turn on socket keepalive (Howard Chu)
Diffstat (limited to 'contrib/epee/include/net')
-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