summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/OutgoingAsync.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/IceInternal/OutgoingAsync.java')
-rw-r--r--java/src/IceInternal/OutgoingAsync.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/java/src/IceInternal/OutgoingAsync.java b/java/src/IceInternal/OutgoingAsync.java
index 9095fdb94c5..2451e7dc99b 100644
--- a/java/src/IceInternal/OutgoingAsync.java
+++ b/java/src/IceInternal/OutgoingAsync.java
@@ -198,7 +198,7 @@ public class OutgoingAsync extends Ice.AsyncResult implements OutgoingAsyncMessa
@Override
public void
- __dispatchInvocationTimeout(ThreadPool threadPool, Ice.Connection connection)
+ __dispatchInvocationCancel(final Ice.LocalException ex, ThreadPool threadPool, Ice.Connection connection)
{
threadPool.dispatch(
new DispatchWorkItem(connection)
@@ -207,7 +207,7 @@ public class OutgoingAsync extends Ice.AsyncResult implements OutgoingAsyncMessa
public void
run()
{
- OutgoingAsync.this.__finished(new Ice.InvocationTimeoutException());
+ OutgoingAsync.this.__finished(ex);
}
});
}
@@ -389,10 +389,10 @@ public class OutgoingAsync extends Ice.AsyncResult implements OutgoingAsyncMessa
{
while(true)
{
+ _handler = _proxy.__getRequestHandler();
try
{
_sent = false;
- _handler = _proxy.__getRequestHandler(true);
int status = _handler.sendAsyncRequest(this);
if((status & AsyncStatus.Sent) > 0)
{
@@ -431,6 +431,15 @@ public class OutgoingAsync extends Ice.AsyncResult implements OutgoingAsyncMessa
}
break;
}
+ catch(Ice.OperationInterruptedException ex)
+ {
+ //
+ // Clear the request handler, and cancel the outgoing request.
+ //
+ _proxy.__setRequestHandler(_handler, null);
+ _handler.asyncRequestCanceled(this, ex);
+ break;
+ }
catch(RetryException ex)
{
_proxy.__setRequestHandler(_handler, null); // Clear request handler and retry.