summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Direct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Direct.cpp')
-rw-r--r--cpp/src/Ice/Direct.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/Ice/Direct.cpp b/cpp/src/Ice/Direct.cpp
index a1e6958d9a0..eb668c94e7d 100644
--- a/cpp/src/Ice/Direct.cpp
+++ b/cpp/src/Ice/Direct.cpp
@@ -30,10 +30,18 @@ IceInternal::Direct::Direct(const Current& current) :
ObjectAdapterI* adapter = dynamic_cast<ObjectAdapterI*>(_current.adapter.get());
assert(adapter);
+ //
+ // Must call incDirectCount() first, because it checks for adapter
+ // deactivation, and prevents deactivation completion until
+ // decDirectCount() is called. This is important, because
+ // getServantManager() may not be called afer deactivation
+ // completion.
+ //
+ adapter->incDirectCount();
+
ServantManagerPtr servantManager = adapter->getServantManager();
assert(servantManager);
- adapter->incDirectCount();
try
{
_servant = servantManager->findServant(_current.id);