summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/OutgoingAsync.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-10-28 13:02:28 -0230
committerDwayne Boone <dwayne@zeroc.com>2008-10-28 13:02:28 -0230
commitd439795f3f59182c53e98e8b92fb3171768e03c3 (patch)
tree169feecdf4e2e61b8c4f0ddda199cd6e191e8adc /cpp/src/Ice/OutgoingAsync.cpp
parentBug 3410 - Check connections for ACM at more appropriate interval (diff)
parentFixed bug 3513 - AMI retry bug (diff)
downloadice-d439795f3f59182c53e98e8b92fb3171768e03c3.tar.bz2
ice-d439795f3f59182c53e98e8b92fb3171768e03c3.tar.xz
ice-d439795f3f59182c53e98e8b92fb3171768e03c3.zip
Merge branch 'R3_3_branch' of ssh://cvs.wpb.zeroc.com/home/git/ice into R3_3_branch
Diffstat (limited to 'cpp/src/Ice/OutgoingAsync.cpp')
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
index 788cb2cb373..3ef1a299197 100644
--- a/cpp/src/Ice/OutgoingAsync.cpp
+++ b/cpp/src/Ice/OutgoingAsync.cpp
@@ -24,6 +24,7 @@
#include <Ice/ReplyStatus.h>
#include <Ice/ImplicitContextI.h>
#include <Ice/ThreadPool.h>
+#include <Ice/RetryQueue.h>
using namespace std;
using namespace Ice;
@@ -454,6 +455,24 @@ IceInternal::OutgoingAsync::__finished(const LocalExceptionWrapper& exc)
}
}
+void
+IceInternal::OutgoingAsync::__retry(int interval)
+{
+ //
+ // This method is called by the proxy to retry an invocation, no
+ // other threads can access this object.
+ //
+ if(interval > 0)
+ {
+ assert(__os);
+ __os->instance()->retryQueue()->add(this, interval);
+ }
+ else
+ {
+ __send();
+ }
+}
+
bool
IceInternal::OutgoingAsync::__send()
{
@@ -466,11 +485,11 @@ IceInternal::OutgoingAsync::__send()
}
catch(const LocalExceptionWrapper& ex)
{
- handleException(ex);
+ handleException(ex); // Might call __send() again upon retry and assign _sentSynchronously
}
catch(const Ice::LocalException& ex)
{
- handleException(ex);
+ handleException(ex); // Might call __send() again upon retry and assign _sentSynchronously
}
return _sentSynchronously;
}
@@ -483,6 +502,7 @@ IceInternal::OutgoingAsync::__prepare(const ObjectPrx& prx, const string& operat
_delegate = 0;
_cnt = 0;
_mode = mode;
+ _sentSynchronously = false;
//
// Can't call async via a batch proxy.