diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-04-22 00:18:21 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-04-22 00:18:21 +0000 |
commit | df25502349ec2ebeadf1b9880bcec8e9e486d459 (patch) | |
tree | 7f3c9b73b5d3039039f2f7766db8a11137db8895 /cpp/demo/Ice/session/Client.cpp | |
parent | align with icej for bug 245 (diff) | |
download | ice-df25502349ec2ebeadf1b9880bcec8e9e486d459.tar.bz2 ice-df25502349ec2ebeadf1b9880bcec8e9e486d459.tar.xz ice-df25502349ec2ebeadf1b9880bcec8e9e486d459.zip |
addressed Bernards comments.
Diffstat (limited to 'cpp/demo/Ice/session/Client.cpp')
-rwxr-xr-x | cpp/demo/Ice/session/Client.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cpp/demo/Ice/session/Client.cpp b/cpp/demo/Ice/session/Client.cpp index 281d8b9e05e..07ddf8cb780 100755 --- a/cpp/demo/Ice/session/Client.cpp +++ b/cpp/demo/Ice/session/Client.cpp @@ -181,10 +181,13 @@ SessionClient::run(int argc, char* argv[]) // // The refresher thread must be terminated before destroy is - // called, otherwise it might get ObjectNotExistException. + // called, otherwise it might get ObjectNotExistException. refresh + // is set to 0 so that if session->destroy() raises an exception + // the thread will not be re-terminated and re-joined. // refresh->terminate(); refresh->getThreadControl().join(); + refresh = 0; if(destroy) { @@ -197,8 +200,11 @@ SessionClient::run(int argc, char* argv[]) // The refresher thread must be terminated in the event of a // failure. // - refresh->terminate(); - refresh->getThreadControl().join(); + if(refresh) + { + refresh->terminate(); + refresh->getThreadControl().join(); + } throw; } |