diff options
author | Howard Chu <hyc@symas.com> | 2018-02-11 23:20:24 +0000 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2018-02-11 23:32:37 +0000 |
commit | f689a77e568f3349118258d97fda3e407dab1be6 (patch) | |
tree | f458d6e9ad895bbb0bbc9fa24d1f4b86adda6cd1 /contrib/epee | |
parent | Merge pull request #3198 (diff) | |
download | monero-f689a77e568f3349118258d97fda3e407dab1be6.tar.xz |
Fix #602 Turn on socket keepalive
Diffstat (limited to 'contrib/epee')
-rw-r--r-- | contrib/epee/include/net/abstract_tcp_server2.inl | 3 |
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 |