This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new d0a6a65b40 Sync keepalive
d0a6a65b40 is described below
commit d0a6a65b40d19dbec65c176e6b62632e3bea0782
Author: remm <[email protected]>
AuthorDate: Wed Sep 27 10:26:16 2023 +0200
Sync keepalive
The call seems risky with unsynced accesses to maps and the sender.
Found by coverity.
---
java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
b/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
index 58dac97495..68dfbca08a 100644
--- a/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
+++ b/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
@@ -372,7 +372,7 @@ public class ParallelNioSender extends AbstractSender
implements MultiPointSende
}
@Override
- public boolean keepalive() {
+ public synchronized boolean keepalive() {
boolean result = false;
for (Iterator<Entry<Member,NioSender>> i =
state.nioSenders.entrySet().iterator(); i.hasNext();) {
Map.Entry<Member, NioSender> entry = i.next();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]