summaryrefslogtreecommitdiff
path: root/cppe/demo/IceE/chat/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppe/demo/IceE/chat/Client.cpp')
-rwxr-xr-xcppe/demo/IceE/chat/Client.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/cppe/demo/IceE/chat/Client.cpp b/cppe/demo/IceE/chat/Client.cpp
index bf4b8493637..d6be7d58b39 100755
--- a/cppe/demo/IceE/chat/Client.cpp
+++ b/cppe/demo/IceE/chat/Client.cpp
@@ -8,6 +8,7 @@
// **********************************************************************
#include <IceE/IceE.h>
+#include <PingThread.h>
#include <Router.h>
#include <Chat.h>
@@ -91,6 +92,9 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
}
}
+ SessionPingThreadPtr ping = new SessionPingThread(session);
+ ping->start();
+
string category = router->getServerProxy()->ice_getIdentity().category;
Identity callbackReceiverIdent;
callbackReceiverIdent.name = "callbackReceiver";
@@ -140,9 +144,13 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
catch(const Exception& ex)
{
fprintf(stderr, "%s\n", ex.toString().c_str());
+ ping->destroy();
+ ping->getThreadControl().join();
return EXIT_FAILURE;
}
+ ping->destroy();
+ ping->getThreadControl().join();
return EXIT_SUCCESS;
}