diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-05-14 13:51:46 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-05-14 13:51:46 +0000 |
commit | d0d7181115e5592f504444c4c7220bfef5b5ce0f (patch) | |
tree | c54a64b8e015c14e1eea708ce5def52f602a02b8 /cppe/demo/IceE/chat/ChatClientDlg.cpp | |
parent | more test cleanup (operations, proxy, timeout). (diff) | |
download | ice-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.cpp | 22 |
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(); } |