summaryrefslogtreecommitdiff
path: root/cppe/demo/IceE/chat/ChatClientDlg.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-05-14 13:51:46 +0000
committerDwayne Boone <dwayne@zeroc.com>2007-05-14 13:51:46 +0000
commitd0d7181115e5592f504444c4c7220bfef5b5ce0f (patch)
treec54a64b8e015c14e1eea708ce5def52f602a02b8 /cppe/demo/IceE/chat/ChatClientDlg.cpp
parentmore test cleanup (operations, proxy, timeout). (diff)
downloadice-d0d7181115e5592f504444c4c7220bfef5b5ce0f.tar.bz2
ice-d0d7181115e5592f504444c4c7220bfef5b5ce0f.tar.xz
ice-d0d7181115e5592f504444c4c7220bfef5b5ce0f.zip
Bug 2191
Diffstat (limited to 'cppe/demo/IceE/chat/ChatClientDlg.cpp')
-rw-r--r--cppe/demo/IceE/chat/ChatClientDlg.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/cppe/demo/IceE/chat/ChatClientDlg.cpp b/cppe/demo/IceE/chat/ChatClientDlg.cpp
index d1ebb899861..5219d9d1798 100644
--- a/cppe/demo/IceE/chat/ChatClientDlg.cpp
+++ b/cppe/demo/IceE/chat/ChatClientDlg.cpp
@@ -193,6 +193,28 @@ CChatClientDlg::OnInitDialog()
void
CChatClientDlg::OnCancel()
{
+ if(_chat)
+ {
+ //
+ // Clear the router.
+ //
+ assert(_router);
+ try
+ {
+ _router->destroySession();
+ }
+ catch(const Ice::ConnectionLostException&)
+ {
+ //
+ // Expected: the router closed the connection.
+ //
+ }
+ catch(const Ice::Exception& ex)
+ {
+ AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION);
+ }
+ }
+
_log->setHandle(0);
CDialog::OnCancel();
}