diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-08-11 17:12:46 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-08-11 17:12:46 +0200 |
commit | fbabceb17a55b97eada8cb01dfd3e141604bc7b8 (patch) | |
tree | c50f34a7d5906c99d5351ed90f511395eddabb02 /cpp/src/Ice/Service.cpp | |
parent | 4177 - Fix getAddresses to not use getaddrinfo when there is no host. (diff) | |
download | ice-fbabceb17a55b97eada8cb01dfd3e141604bc7b8.tar.bz2 ice-fbabceb17a55b97eada8cb01dfd3e141604bc7b8.tar.xz ice-fbabceb17a55b97eada8cb01dfd3e141604bc7b8.zip |
Fixed bug 4202 and cleaned up Ice.Application logging
Diffstat (limited to 'cpp/src/Ice/Service.cpp')
-rw-r--r-- | cpp/src/Ice/Service.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index 9ee6bf2fe92..9ba820445f0 100644 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -849,12 +849,15 @@ Ice::Service::run(int& argc, char* argv[], const InitializationData& initData) error("service caught unhandled C++ exception"); } - try - { - _communicator->destroy(); - } - catch(...) + if(_communicator) { + try + { + _communicator->destroy(); + } + catch(...) + { + } } return status; @@ -1627,6 +1630,7 @@ Ice::Service::serviceMain(int argc, char* argv[]) try { + assert(_communicator); _communicator->destroy(); } catch(...) @@ -2105,12 +2109,15 @@ Ice::Service::runDaemon(int argc, char* argv[], const InitializationData& initDa close(fds[1]); } - try - { - _communicator->destroy(); - } - catch(...) + if(_communicator) { + try + { + _communicator->destroy(); + } + catch(...) + { + } } return status; |