diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-06-03 11:12:44 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-06-03 11:12:44 +0000 |
commit | 821ecfd895990ab4ea8bb86b361a6ba4980a26d0 (patch) | |
tree | dd9c4b0a01dbf651ca2b30154815dc514f84b489 /cpp/src/IcePack/Activator.cpp | |
parent | Added missing define for DEBUG to Make.rules.cs. Disabled FinalizerAssert (diff) | |
download | ice-821ecfd895990ab4ea8bb86b361a6ba4980a26d0.tar.bz2 ice-821ecfd895990ab4ea8bb86b361a6ba4980a26d0.tar.xz ice-821ecfd895990ab4ea8bb86b361a6ba4980a26d0.zip |
Fixed bug where shutdown() call on the process proxy would hang
indefinitely.
Diffstat (limited to 'cpp/src/IcePack/Activator.cpp')
-rw-r--r-- | cpp/src/IcePack/Activator.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/cpp/src/IcePack/Activator.cpp b/cpp/src/IcePack/Activator.cpp index 6467909ccd5..4250241ce0b 100644 --- a/cpp/src/IcePack/Activator.cpp +++ b/cpp/src/IcePack/Activator.cpp @@ -46,6 +46,31 @@ private: Activator& _activator; }; +class ProcessShutdownCB : public AMI_Process_shutdown +{ +public: + + ProcessShutdownCB(const ActivatorPtr& activator, const string& name) : _activator(activator), _name(name) + { + } + + virtual void + ice_response() + { + } + + virtual void + ice_exception(const Ice::Exception&) + { + _activator->deactivate(_name, 0); + } + +private: + + const ActivatorPtr _activator; + const string _name; +}; + } #define ICE_STRING(X) #X @@ -768,7 +793,7 @@ Activator::deactivate(const string& name, const Ice::ProcessPrx& process) } try { - process->shutdown(); + process->shutdown_async(new ProcessShutdownCB(this, name)); return; } catch(const Ice::LocalException& ex) |