From: Dave B. <bla...@us...> - 2012-03-14 12:12:37
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http In directory vz-cvs-3.sog:/tmp/cvs-serv9581/src/org/sblim/cimclient/internal/http Modified Files: Tag: Experimental HttpClient.java Log Message: 3504304 - Rename socket timeout variables Index: HttpClient.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/HttpClient.java,v retrieving revision 1.12.2.28 retrieving revision 1.12.2.29 diff -u -d -r1.12.2.28 -r1.12.2.29 --- HttpClient.java 23 Feb 2012 21:08:24 -0000 1.12.2.28 +++ HttpClient.java 14 Mar 2012 12:12:34 -0000 1.12.2.29 @@ -62,6 +62,7 @@ * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues * 3444912 2011-11-29 blaschke-oss Client delay during SSL handshake * 3492224 2012-02-23 blaschke-oss Need two different timeouts for Socket connections + * 3504304 2012-03-14 blaschke-oss Rename socket timeout variables */ package org.sblim.cimclient.internal.http; @@ -959,8 +960,8 @@ closeConnection(); } - int timeout = this.iHttpClientPool.getConfigurationContext().getHttpTimeout(); - logger.trace(Level.FINER, "Setting http timeout=" + timeout); + int httpTimeout = this.iHttpClientPool.getConfigurationContext().getHttpTimeout(); + logger.trace(Level.FINER, "Setting http timeout=" + httpTimeout); if (this.iSocket == null) { // Determine whether we need to connect with a timeout or not @@ -995,21 +996,21 @@ } logger.trace(Level.FINER, "Creating new http for url " + this.iUrl.toString()); if (socketConnectWithTimeout) { - int soTimeout = this.iHttpClientPool.getConfigurationContext() + int connectTimeout = this.iHttpClientPool.getConfigurationContext() .getSocketConnectTimeout(); - logger.trace(Level.FINER, "Setting socket connect timeout=" + soTimeout); + logger.trace(Level.FINER, "Setting socket connect timeout=" + connectTimeout); if (factory instanceof SSLSocketFactory) { Socket sock = new Socket(); sock.connect(new InetSocketAddress(this.iUrl.getHost(), this.iUrl.getPort()), - soTimeout); + connectTimeout); this.iSocket = ((SSLSocketFactory) factory).createSocket(sock, this.iUrl .getHost(), this.iUrl.getPort(), true); } else { this.iSocket = factory.createSocket(); if (this.iSocket != null) this.iSocket.connect(new InetSocketAddress(this.iUrl - .getHost(), this.iUrl.getPort()), soTimeout); + .getHost(), this.iUrl.getPort()), connectTimeout); } } else { this.iSocket = factory.createSocket(this.iUrl.getHost(), this.iUrl.getPort()); @@ -1022,7 +1023,7 @@ this.iSocket.setTcpNoDelay(true); this.iSocket.setKeepAlive(true); - this.iSocket.setSoTimeout(timeout); + this.iSocket.setSoTimeout(httpTimeout); if (this.iSocket instanceof SSLSocket) { // Determine whether we need to perform SSL handshake or not @@ -1084,7 +1085,7 @@ } logger.trace(Level.FINER, "total bytes on the stream=" + totalBytes); } - this.iSocket.setSoTimeout(timeout); + this.iSocket.setSoTimeout(httpTimeout); } } |