summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/Activator.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-06-03 11:12:44 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-06-03 11:12:44 +0000
commit821ecfd895990ab4ea8bb86b361a6ba4980a26d0 (patch)
treedd9c4b0a01dbf651ca2b30154815dc514f84b489 /cpp/src/IcePack/Activator.cpp
parentAdded missing define for DEBUG to Make.rules.cs. Disabled FinalizerAssert (diff)
downloadice-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.cpp27
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)