From 37315f877ef27d0f8585389f0c83cd00a31577c1 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Mon, 21 Nov 2016 15:22:48 +0100 Subject: Reworked server and client to do one mix and shutdown. This is done as cleanly as possible to track down any memory leaks. unfortunately there is still one async operation running on the nodes. when there should be none. So the nodes are still forced to stop with a. io_service.stop(). --- libcmix-network/client.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libcmix-network/client.hpp') diff --git a/libcmix-network/client.hpp b/libcmix-network/client.hpp index c583628..b43f32b 100644 --- a/libcmix-network/client.hpp +++ b/libcmix-network/client.hpp @@ -189,7 +189,7 @@ public: * \brief close Closes the underlying socket. */ void close() { - socket->close(); + socket->next_layer().shutdown(boost::asio::ip::tcp::socket::shutdown_type::shutdown_both); } /*! @@ -268,7 +268,8 @@ struct SSLClient : private BaseClientlowest_layer().cancel(); + socket->shutdown(); + BaseClient::close(); } using BaseClient::on_done; -- cgit v1.2.3-70-g09d2