471251 - Improved debugging on async timeout

This commit is contained in:
Greg Wilkins 2015-07-02 08:01:03 +10:00
parent 8d869bf88b
commit ca8ba1c080
1 changed files with 9 additions and 0 deletions

View File

@ -21,6 +21,7 @@ package org.eclipse.jetty.server;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import javax.servlet.AsyncListener;
import javax.servlet.RequestDispatcher;
@ -427,6 +428,9 @@ public class HttpChannelState
aListeners=_asyncListeners;
}
if (LOG.isDebugEnabled())
LOG.debug("Async timeout {}",this);
if (aListeners!=null)
{
for (AsyncListener listener : aListeners)
@ -454,14 +458,19 @@ public class HttpChannelState
if (_state==State.ASYNC_WAIT)
{
_state=State.ASYNC_WOKEN;
_event.setThrowable(new TimeoutException("async"));
dispatch=true;
}
}
}
if (dispatch)
{
if (LOG.isDebugEnabled())
LOG.debug("Dispatch after async timeout {}",this);
scheduleDispatch();
}
}
public void complete()
{