hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r627457 - /httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
Date Wed, 13 Feb 2008 15:14:20 GMT
Author: olegk
Date: Wed Feb 13 07:14:19 2008
New Revision: 627457

URL: http://svn.apache.org/viewvc?rev=627457&view=rev
Log:
Do not throw an IllegalStateException in #isStale if the connection is closed

Modified:
    httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java

Modified: httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java?rev=627457&r1=627456&r2=627457&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
(original)
+++ httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
Wed Feb 13 07:14:19 2008
@@ -194,7 +194,9 @@
     }
     
     public boolean isStale() {
-        assertOpen();
+        if (!isOpen()) {
+            return true;
+        }
         try {
             this.inbuffer.isDataAvailable(1);
             return false;



Mime
View raw message