[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-commit] r1543 - jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client

Author: gwilkins
Date: 2010-04-21 08:43:24 -0400 (Wed, 21 Apr 2010)
New Revision: 1543

Modified:
   jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java
Log:
debug

Modified: jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java
===================================================================
--- jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java	2010-04-21 12:23:55 UTC (rev 1542)
+++ jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java	2010-04-21 12:43:24 UTC (rev 1543)
@@ -15,6 +15,7 @@
 
 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 @@
             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);
+                }
             }
         }
     }