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/acceptor.cpp | |
| 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/acceptor.cpp')
| -rw-r--r-- | libcmix-network/acceptor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcmix-network/acceptor.cpp b/libcmix-network/acceptor.cpp index ee8833a..02a0541 100644 --- a/libcmix-network/acceptor.cpp +++ b/libcmix-network/acceptor.cpp @@ -56,5 +56,6 @@ void Acceptor::start_accepting(std::shared_ptr<ssl::context> ctx, SSLAcceptHandl void Acceptor::close() { - acceptor.close(); + acceptor.get_io_service().post([this]{acceptor.cancel();}); + acceptor.get_io_service().post([this]{acceptor.close();}); } |
