git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1543 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-04-21 12:43:24 +00:00
parent 7fcf968406
commit af0e30d908
1 changed files with 14 additions and 2 deletions

View File

@ -15,6 +15,7 @@ package org.eclipse.jetty.client;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.net.SocketTimeoutException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@ -295,8 +296,19 @@ public class HttpDestination
if (_queue.size() > 0)
{
HttpExchange ex = _queue.removeFirst();
ex.setStatus(HttpExchange.STATUS_EXCEPTED);
ex.getEventListener().onException(throwable);
if (throwable instanceof SocketTimeoutException ||
throwable.getCause() instanceof SocketTimeoutException)
{
Log.debug(throwable);
ex.setStatus(HttpExchange.STATUS_EXPIRED);
ex.getEventListener().onExpire();
}
else
{
ex.setStatus(HttpExchange.STATUS_EXCEPTED);
ex.getEventListener().onException(throwable);
}
}
}
}