summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java50
1 files changed, 5 insertions, 45 deletions
diff --git a/java/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java b/java/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java
index a5f92ac090c..c1636662c8c 100644
--- a/java/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java
+++ b/java/src/Ice/src/main/java/IceInternal/ConnectRequestHandler.java
@@ -293,18 +293,7 @@ public class ConnectRequestHandler
// from the client thread pool since this will result in ice_exception callbacks to be
// called.
//
- if(!_requests.isEmpty())
- {
- _reference.getInstance().clientThreadPool().dispatch(new DispatchWorkItem(_connection)
- {
- @Override
- public void
- run()
- {
- flushRequestsWithException();
- };
- });
- }
+ flushRequestsWithException();
notifyAll();
}
@@ -414,7 +403,7 @@ public class ConnectRequestHandler
if((request.outAsync.send(_connection, _compress, _response) &
AsyncStatus.InvokeSentCallback) > 0)
{
- sentCallbacks.add(request.outAsync);
+ request.outAsync.invokeSentAsync();
}
}
else
@@ -449,14 +438,7 @@ public class ConnectRequestHandler
{
assert(_exception == null && !_requests.isEmpty());
_exception = ex.get();
- _reference.getInstance().clientThreadPool().dispatch(new DispatchWorkItem(_connection)
- {
- @Override
- public void run()
- {
- flushRequestsWithException();
- };
- });
+ flushRequestsWithException();
}
}
catch(final Ice.LocalException ex)
@@ -465,32 +447,10 @@ public class ConnectRequestHandler
{
assert(_exception == null && !_requests.isEmpty());
_exception = ex;
- _reference.getInstance().clientThreadPool().dispatch(new DispatchWorkItem(_connection)
- {
- @Override
- public void run()
- {
- flushRequestsWithException();
- };
- });
+ flushRequestsWithException();
}
}
- if(!sentCallbacks.isEmpty())
- {
- _reference.getInstance().clientThreadPool().dispatch(new DispatchWorkItem(_connection)
- {
- @Override
- public void run()
- {
- for(OutgoingAsyncBase callback : sentCallbacks)
- {
- callback.invokeSent();
- }
- };
- });
- }
-
//
// We've finished sending the queued requests and the request handler now send
// the requests over the connection directly. It's time to substitute the
@@ -555,7 +515,7 @@ public class ConnectRequestHandler
{
if(request.outAsync.completed(_exception))
{
- request.outAsync.invokeCompleted();
+ request.outAsync.invokeCompletedAsync();
}
}
}