This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 582cc72 Fix a couple of very unlikely concurrency issues writing WebSocket msgs 582cc72 is described below commit 582cc729c54180d9dc37390e855fb7cccba56cb7 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Dec 4 12:55:18 2019 +0000 Fix a couple of very unlikely concurrency issues writing WebSocket msgs --- java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java | 4 ++-- webapps/docs/changelog.xml | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java index f022132..548f5a9 100644 --- a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java +++ b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java @@ -841,7 +841,7 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { private final ByteBuffer outputBuffer; private final boolean flushRequired; private final WsRemoteEndpointImplBase endpoint; - private int maskIndex = 0; + private volatile int maskIndex = 0; public OutputBufferSendHandler(SendHandler completion, long blockingWriteTimeoutExpiry, @@ -1258,7 +1258,7 @@ public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { private static class BlockingSendHandler implements SendHandler { - private SendResult sendResult = null; + private volatile SendResult sendResult = null; @Override public void onResult(SendResult result) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index cedc2bd..6b0d199 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -116,6 +116,14 @@ </fix> </changelog> </subsection> + <subsection name="WebSocket"> + <changelog> + <fix> + Ensure a couple of very unlikely concurrency issues are avoided when + writing WebSocket messages. (markt) + </fix> + </changelog> + </subsection> <subsection name="Web applications"> <changelog> <fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org