aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/abstract_tcp_server2.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-12 18:12:04 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-12 18:13:31 +0000
commitc3cf930f75d0d4a3bbcfb0029c481a6de4406a9d (patch)
treee2a7d7c7e24811689a77952473ae849c04c846c6 /contrib/epee/include/net/abstract_tcp_server2.h
parentMerge pull request #5386 (diff)
downloadmonero-c3cf930f75d0d4a3bbcfb0029c481a6de4406a9d.tar.xz
abstract_tcp_server2: fix timeout on exit
When closing connections due to exiting, the IO service is already gone, so the data exchange needed for a gracious SSL shutdown cannot happen. We just close the socket in that case.
Diffstat (limited to 'contrib/epee/include/net/abstract_tcp_server2.h')
-rw-r--r--contrib/epee/include/net/abstract_tcp_server2.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/epee/include/net/abstract_tcp_server2.h b/contrib/epee/include/net/abstract_tcp_server2.h
index d0eabbba5..374a28a2e 100644
--- a/contrib/epee/include/net/abstract_tcp_server2.h
+++ b/contrib/epee/include/net/abstract_tcp_server2.h
@@ -93,11 +93,12 @@ namespace net_utils
struct shared_state : connection_basic_shared_state
{
shared_state()
- : connection_basic_shared_state(), pfilter(nullptr), config()
+ : connection_basic_shared_state(), pfilter(nullptr), config(), stop_signal_sent(false)
{}
i_connection_filter* pfilter;
typename t_protocol_handler::config_type config;
+ bool stop_signal_sent;
};
/// Construct a connection with the given io_service.