Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
4.2.3, 4.3 Alpha1
-
None
-
Windows 7 64bits
Description
Deadlock in http.client.fluent.Async.ExecRunnable.run() if an exception is thrown in FutureCallback.completed()
Look at the <<<http.client.fluent.Async.ExecRunnable.run()>>> method:
public void run() {
try
catch (Exception ex)
{ **** this is never called because the BasicFuture.completed flag is set to true BEFORE the callback invocation **** (see below) this.future.failed(ex); }}
<<<http.concurrent.BasicFuture>>>
public synchronized boolean completed(final T result) {
if (this.completed)
this.completed = true;
this.result = result;
if (this.callback != null) { this.callback.completed(result); }
*** not executed if an exception in the callback.completed()
notifyAll();
return true;
}
public synchronized boolean failed(final Exception exception) {
if (this.completed) { return false; }
-
-
- the following can't be reached if there is an exception in this.callback.completed() so that
- BasicFuture.get() waits forever
-
this.completed = true;
this.ex = exception;
if (this.callback != null)
notifyAll();
return true;
}
Attachments
Issue Links
- duplicates
-
HTTPCORE-331 deadlock in AbstractNIOConnPool
- Closed