aboutsummaryrefslogtreecommitdiff
path: root/libcmix-network/server.cpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-11-21 15:22:48 +0100
committerDennis Brentjes <d.brentjes@gmail.com>2016-11-21 15:22:48 +0100
commit37315f877ef27d0f8585389f0c83cd00a31577c1 (patch)
treecaead8a996811c154859d97ae3c5c946ae8da4b6 /libcmix-network/server.cpp
parente4cf0d04c4afff98603df440d12a4a19b3717a34 (diff)
downloadcmix-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/server.cpp')
-rw-r--r--libcmix-network/server.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/libcmix-network/server.cpp b/libcmix-network/server.cpp
index 195c5a0..a931c1e 100644
--- a/libcmix-network/server.cpp
+++ b/libcmix-network/server.cpp
@@ -66,6 +66,10 @@ Server::Server(io_service& io_service, const ListenSettings& listen_settings, st
void Server::close()
{
- v4_acceptor.close();
- v6_acceptor.close();
+ if(v4_acceptor.is_open()) {
+ v4_acceptor.close();
+ }
+ if(v6_acceptor.is_open()) {
+ v6_acceptor.close();
+ }
} \ No newline at end of file