diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java index 58a0d46a6d..127a1eeda0 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java @@ -40,11 +40,11 @@ public abstract class WebSocketClientHandshaker { private final WebSocketVersion version; - private boolean handshakeComplete; + private volatile boolean handshakeComplete; private final String expectedSubprotocol; - private String actualSubprotocol; + private volatile String actualSubprotocol; protected final HttpHeaders customHeaders;