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 52cab0c readOperation and writeOperation are used across threads without syncs 52cab0c is described below commit 52cab0c6b91441c2f1f73999981cc658ecd8e900 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Jun 7 11:02:00 2019 +0100 readOperation and writeOperation are used across threads without syncs Make them volatile so updates in one thread are visible to another. Note that this does not affect the fields in the OperationState instances. --- java/org/apache/tomcat/util/net/SocketWrapperBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java index 4207fd3..d4af16b 100644 --- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java +++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java @@ -104,9 +104,9 @@ public abstract class SocketWrapperBase<E> { protected final WriteBuffer nonBlockingWriteBuffer = new WriteBuffer(bufferedWriteSize); protected final Semaphore readPending; - protected OperationState<?> readOperation = null; + protected volatile OperationState<?> readOperation = null; protected final Semaphore writePending; - protected OperationState<?> writeOperation = null; + protected volatile OperationState<?> writeOperation = null; public SocketWrapperBase(E socket, AbstractEndpoint<E,?> endpoint) { this.socket = socket; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org