diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-06-02 16:49:06 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-06-02 16:49:06 +0200 |
commit | 4fc008121c935580eee9ef1cfb71d45c44f4d54c (patch) | |
tree | d2ae9ff103869206d4e0da09ba58cb77960b1c73 /java/src | |
parent | Added missing copyright notice (diff) | |
download | ice-4fc008121c935580eee9ef1cfb71d45c44f4d54c.tar.bz2 ice-4fc008121c935580eee9ef1cfb71d45c44f4d54c.tar.xz ice-4fc008121c935580eee9ef1cfb71d45c44f4d54c.zip |
Reverted fix which wasn't supposed to be comitted yet
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/Ice/src/main/java/com/zeroc/IceInternal/InvocationFutureI.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/java/src/Ice/src/main/java/com/zeroc/IceInternal/InvocationFutureI.java b/java/src/Ice/src/main/java/com/zeroc/IceInternal/InvocationFutureI.java index 951a103fe44..3be5400e401 100644 --- a/java/src/Ice/src/main/java/com/zeroc/IceInternal/InvocationFutureI.java +++ b/java/src/Ice/src/main/java/com/zeroc/IceInternal/InvocationFutureI.java @@ -133,13 +133,30 @@ public abstract class InvocationFutureI<T> extends com.zeroc.Ice.InvocationFutur // calling thread if the request was sent synchronously. Calling complete() or // completeExceptionally() on _sentFuture invokes the action from this thread. // - if(_exception != null) + if(_sentSynchronously) { - _sentFuture.completeExceptionally(_exception); + if(_exception != null) + { + _sentFuture.completeExceptionally(_exception); + } + else + { + _sentFuture.complete(_sentSynchronously); + } } else { - _sentFuture.complete(_sentSynchronously); + if(_exception != null) + { + dispatch(() -> + { + _sentFuture.completeExceptionally(_exception); + }); + } + else + { + invokeSentAsync(); + } } } return r; |