diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-05-05 02:16:49 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-05-05 02:16:49 +0000 |
commit | 7f06c7ad7e112b964e1fc45363cd12f1bcce273f (patch) | |
tree | e28e220ffa91d8f413d0a088ef257c5755168748 /cpp/demo/Ice/session/Client.cpp | |
parent | http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=276. short circuit eval (diff) | |
download | ice-7f06c7ad7e112b964e1fc45363cd12f1bcce273f.tar.bz2 ice-7f06c7ad7e112b964e1fc45363cd12f1bcce273f.tar.xz ice-7f06c7ad7e112b964e1fc45363cd12f1bcce273f.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=276
Diffstat (limited to 'cpp/demo/Ice/session/Client.cpp')
-rwxr-xr-x | cpp/demo/Ice/session/Client.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cpp/demo/Ice/session/Client.cpp b/cpp/demo/Ice/session/Client.cpp index 07ddf8cb780..9cd28f4119a 100755 --- a/cpp/demo/Ice/session/Client.cpp +++ b/cpp/demo/Ice/session/Client.cpp @@ -126,6 +126,7 @@ SessionClient::run(int argc, char* argv[]) try { bool destroy = true; + bool shutdown = false; while(true) { cout << "==> "; @@ -157,7 +158,9 @@ SessionClient::run(int argc, char* argv[]) } else if(c == 's') { - factory->shutdown(); + destroy = false; + shutdown = true; + break; } else if(c == 'x') { @@ -193,6 +196,10 @@ SessionClient::run(int argc, char* argv[]) { session->destroy(); } + if(shutdown) + { + factory->shutdown(); + } } catch(...) { @@ -218,7 +225,7 @@ SessionClient::menu() "usage:\n" "c: create a new per-client hello object\n" "0-9: send a greeting to a hello object\n" - "s: shutdown the server\n" + "s: shutdown the server and exit\n" "x: exit\n" "t: exit without destroying the session\n" "?: help\n"; |