This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new e9e23a5155 Improve granularity of try/catch
e9e23a5155 is described below

commit e9e23a51557f1d9deb1cc0832ee786efef4f2a1a
Author: remm <[email protected]>
AuthorDate: Fri Mar 27 08:47:20 2026 +0100

    Improve granularity of try/catch
    
    Based on PR#968 by YCharanGowda.
---
 java/org/apache/catalina/ha/tcp/ReplicationValve.java | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/ha/tcp/ReplicationValve.java 
b/java/org/apache/catalina/ha/tcp/ReplicationValve.java
index 69ab9e907d..00fd5570fd 100644
--- a/java/org/apache/catalina/ha/tcp/ReplicationValve.java
+++ b/java/org/apache/catalina/ha/tcp/ReplicationValve.java
@@ -362,16 +362,22 @@ public class ReplicationValve extends ValveBase 
implements ClusterValve {
             start = System.currentTimeMillis();
         }
         try {
+            // FIXME we have a lot of sends, but the trouble with one node 
stops the correct replication to other nodes!
             // send invalid sessions
             sendInvalidSessions(clusterManager);
             // send replication
-            sendSessionReplicationMessage(request, clusterManager);
-            if (isCrossContext) {
-                sendCrossContextSession();
+            try {
+                sendSessionReplicationMessage(request, clusterManager);
+            } catch (Exception e) {
+                log.error(sm.getString("ReplicationValve.send.failure"), e);
+            }
+            try {
+                if (isCrossContext) {
+                    sendCrossContextSession();
+                }
+            } catch (Exception e) {
+                log.error(sm.getString("ReplicationValve.send.failure"), e);
             }
-        } catch (Exception e) {
-            // FIXME we have a lot of sends, but the trouble with one node 
stops the correct replication to other nodes!
-            log.error(sm.getString("ReplicationValve.send.failure"), e);
         } finally {
             if (doStatistics()) {
                 updateStats(totalstart, start, isAsync);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to