summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/async/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Ice/async/Server.cpp')
-rw-r--r--cpp/demo/Ice/async/Server.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/cpp/demo/Ice/async/Server.cpp b/cpp/demo/Ice/async/Server.cpp
index a3d94180741..0e1f0ee4fcf 100644
--- a/cpp/demo/Ice/async/Server.cpp
+++ b/cpp/demo/Ice/async/Server.cpp
@@ -45,6 +45,7 @@ AsyncServer::run(int argc, char* argv[])
adapter->activate();
communicator()->waitForShutdown();
+ _workQueue->getThreadControl().join();
return EXIT_SUCCESS;
}
@@ -52,18 +53,5 @@ void
AsyncServer::interruptCallback(int)
{
_workQueue->destroy();
- _workQueue->getThreadControl().join();
-
- try
- {
- communicator()->destroy();
- }
- catch(const IceUtil::Exception& ex)
- {
- cerr << appName() << ": " << ex << endl;
- }
- catch(...)
- {
- cerr << appName() << ": unknown exception" << endl;
- }
+ communicator()->shutdown();
}