422723 - Dispatch failed callbacks to avoid blocking selector
Call direct if dispatch rejected
This commit is contained in:
parent
6848186bfa
commit
4e0c1cbcf9
|
@ -604,14 +604,22 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
|
|||
public void failed(final Throwable x)
|
||||
{
|
||||
super.failed(x);
|
||||
getExecutor().execute(new Runnable()
|
||||
try
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
getExecutor().execute(new Runnable()
|
||||
{
|
||||
_callback.failed(x);
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
_callback.failed(x);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(RejectedExecutionException e)
|
||||
{
|
||||
LOG.debug(e);
|
||||
_callback.failed(x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue