diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-11-21 15:22:48 +0100 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-11-21 15:22:48 +0100 |
| commit | 37315f877ef27d0f8585389f0c83cd00a31577c1 (patch) | |
| tree | caead8a996811c154859d97ae3c5c946ae8da4b6 /libcmix-network/client.hpp | |
| parent | e4cf0d04c4afff98603df440d12a4a19b3717a34 (diff) | |
| download | cmix-37315f877ef27d0f8585389f0c83cd00a31577c1.tar.gz cmix-37315f877ef27d0f8585389f0c83cd00a31577c1.tar.bz2 cmix-37315f877ef27d0f8585389f0c83cd00a31577c1.zip | |
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().
Diffstat (limited to 'libcmix-network/client.hpp')
| -rw-r--r-- | libcmix-network/client.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 BaseClient<boost::asio::ssl::stream<boost::asio::ip:: * \brief close Closes the underlying socket. */ void close() { - socket->lowest_layer().cancel(); + socket->shutdown(); + BaseClient::close(); } using BaseClient::on_done; |
