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.
This commit is contained in:
moneromooo-monero 2019-04-12 18:12:04 +00:00
parent 9c77dbf376
commit c3cf930f75
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
2 changed files with 9 additions and 2 deletions

View file

@ -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.