You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ol...@apache.org on 2005/01/06 20:02:50 UTC
cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpConnection.java
olegk 2005/01/06 11:02:50
Modified: httpclient/src/java/org/apache/commons/httpclient
HttpConnection.java
Log:
PR #32955 (Checking of stale connections is broken)
Contributed by Oliver Koell <oko at newbase.de>
Reviewed by Oleg Kalnichevski
Revision Changes Path
1.105 +6 -11 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java
Index: HttpConnection.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- HttpConnection.java 20 Dec 2004 19:52:50 -0000 1.104
+++ HttpConnection.java 6 Jan 2005 19:02:49 -0000 1.105
@@ -80,7 +80,7 @@
*
* @author Rod Waldhoff
* @author Sean C. Sullivan
- * @author Ortwin Gl??ck
+ * @author Ortwin Glueck
* @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
* @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
@@ -429,7 +429,7 @@
* @since 3.0
*/
public boolean closeIfStale() throws IOException {
- if (used && isOpen && isStale()) {
+ if (isOpen && isStale()) {
LOG.debug("Connection is stale, closing...");
close();
return true;
@@ -743,7 +743,6 @@
inputStream = new BufferedInputStream(socket.getInputStream(), inbuffersize);
outputStream = new BufferedOutputStream(socket.getOutputStream(), outbuffersize);
isOpen = true;
- used = false;
} catch (IOException e) {
// Connection wasn't opened properly
// so close everything out
@@ -1249,7 +1248,6 @@
}
}
isOpen = false;
- used = false;
tunnelEstablished = false;
usingSecureSocket = false;
}
@@ -1319,9 +1317,6 @@
private static final Log LOG = LogFactory.getLog(HttpConnection.class);
// ----------------------------------------------------- Instance Variables
-
- /** A flag indicating if this connection has been used since being opened */
- private boolean used = false;
/** My host. */
private String hostName = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org