tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r549097 - in /tomcat/container/tc5.5.x: modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java webapps/docs/changelog.xml
Date Wed, 20 Jun 2007 12:56:28 GMT
Author: pero
Date: Wed Jun 20 05:56:27 2007
New Revision: 549097

URL: http://svn.apache.org/viewvc?view=rev&rev=549097
Log:
No way to timeout new connect attempts for replication sockets. Fix bug 42689

Modified:
    tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java?view=diff&rev=549097&r1=549096&r2=549097
==============================================================================
--- tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
(original)
+++ tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java
Wed Jun 20 05:56:27 2007
@@ -19,7 +19,9 @@
 import java.io.IOException;
 import java.io.OutputStream;
 import java.net.InetAddress;
+import java.net.InetSocketAddress;
 import java.net.Socket;
+import java.net.SocketAddress;
 import java.net.SocketException;
 
 import org.apache.catalina.cluster.ClusterMessage;
@@ -709,11 +711,20 @@
      }
 
     /**
+     * Create new Socket and use actTimeout (>0) as connect timeout
+     * 
      * @throws IOException
      * @throws SocketException
      */
     protected void createSocket() throws IOException, SocketException {
-        socket = new Socket(getAddress(), getPort());
+        SocketAddress sockAddr = new InetSocketAddress(getAddress(), getPort());
+        socket = new Socket();
+        int timeout = (int) getAckTimeout();
+        if (timeout > 0) {
+           socket.connect(sockAddr, timeout);
+        } else {
+           socket.connect(sockAddr);
+        }
     }
 
     /**

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=549097&r1=549096&r2=549097
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Jun 20 05:56:27 2007
@@ -32,7 +32,7 @@
   <subsection name="Jasper">
     <changelog>
       <fix>
-        <bug>42643</bug> Prevent creation of duplicate JSP function mapper
+        <bug>42643</bug>: Prevent creation of duplicate JSP function mapper
         variables. (markt)
       </fix>
     </changelog>
@@ -43,6 +43,14 @@
         Fix XSS security vulnerabilities (CVE-2007-2449) in the examples.
         Reported by Toshiharu Sugiyama. (markt)
       </fix>
+    </changelog>
+  </subsection> 
+  <subsection name="Cluster">
+   <changelog>
+     <fix>
+        <bug>42689</bug>: No way to timeout new connect attempts for replication
sockets. 
+        Patch by Casey Lucas (pero)
+     </fix>     
     </changelog>
   </subsection>
 </section>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message