diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-07-15 10:22:40 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-07-15 10:22:40 +0200 |
commit | 710a9221852d6c92b1727a429a33b38f1f949352 (patch) | |
tree | 6bc9ac9ed04a6b1858d8fc30282d4f18ef04abbb /java/src/IceInternal/ConnectRequestHandler.java | |
parent | - Fix for ICE-5578 - Python build failure (diff) | |
download | ice-710a9221852d6c92b1727a429a33b38f1f949352.tar.bz2 ice-710a9221852d6c92b1727a429a33b38f1f949352.tar.xz ice-710a9221852d6c92b1727a429a33b38f1f949352.zip |
Fixed collocation optimization to use the dispatcher, minor test fixes
Diffstat (limited to 'java/src/IceInternal/ConnectRequestHandler.java')
-rw-r--r-- | java/src/IceInternal/ConnectRequestHandler.java | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/java/src/IceInternal/ConnectRequestHandler.java b/java/src/IceInternal/ConnectRequestHandler.java index 0505688cdda..6c08f7dc261 100644 --- a/java/src/IceInternal/ConnectRequestHandler.java +++ b/java/src/IceInternal/ConnectRequestHandler.java @@ -203,7 +203,7 @@ public class ConnectRequestHandler Request request = it.next(); if(request.out == out) { - out.finished(new Ice.InvocationTimeoutException(), false); + out.finished(new Ice.InvocationTimeoutException()); it.remove(); return; } @@ -217,7 +217,6 @@ public class ConnectRequestHandler public void asyncRequestTimedOut(OutgoingAsyncMessageCallback outAsync) { - boolean timedOut = false; synchronized(this) { if(_exception != null) @@ -234,17 +233,13 @@ public class ConnectRequestHandler if(request.outAsync == outAsync) { it.remove(); - timedOut = true; - break; + outAsync.__dispatchInvocationTimeout(_reference.getInstance().clientThreadPool(), null); + return; // We're done } } + assert(false); // The request has to be queued if it timed out and we're not initialized yet. } } - if(timedOut) - { - outAsync.__finished(new Ice.InvocationTimeoutException(), false); - return; - } _connection.asyncRequestTimedOut(outAsync); } @@ -333,7 +328,7 @@ public class ConnectRequestHandler // if(!_requests.isEmpty()) { - _reference.getInstance().clientThreadPool().execute(new DispatchWorkItem(_connection) + _reference.getInstance().clientThreadPool().dispatch(new DispatchWorkItem(_connection) { public void run() @@ -487,7 +482,7 @@ public class ConnectRequestHandler { assert(_exception == null && !_requests.isEmpty()); _exception = ex.get(); - _reference.getInstance().clientThreadPool().execute(new DispatchWorkItem(_connection) + _reference.getInstance().clientThreadPool().dispatch(new DispatchWorkItem(_connection) { public void run() @@ -503,7 +498,7 @@ public class ConnectRequestHandler { assert(_exception == null && !_requests.isEmpty()); _exception = ex; - _reference.getInstance().clientThreadPool().execute(new DispatchWorkItem(_connection) + _reference.getInstance().clientThreadPool().dispatch(new DispatchWorkItem(_connection) { public void run() @@ -516,7 +511,7 @@ public class ConnectRequestHandler if(!sentCallbacks.isEmpty()) { - _reference.getInstance().clientThreadPool().execute( + _reference.getInstance().clientThreadPool().dispatch( new DispatchWorkItem(_connection) { public void @@ -564,11 +559,11 @@ public class ConnectRequestHandler { if(request.out != null) { - request.out.finished(_exception, false); + request.out.finished(_exception); } else if(request.outAsync != null) { - request.outAsync.__finished(_exception, false); + request.outAsync.__finished(_exception); } } _requests.clear(); |