@@ -54,24 +54,24 @@ public class WebSocketImpl extends WebSocket {
5454 * Determines whether to receive data as part of the
5555 * handshake, or as part of text/data frame transmitted over the websocket.
5656 */
57- private boolean handshakeComplete = false ;
57+ private volatile boolean handshakeComplete = false ;
5858 /**
5959 * Determines whether we sent already a request to Close the connection or not.
6060 */
61- private boolean closeHandshakeSent = false ;
61+ private volatile boolean closeHandshakeSent = false ;
6262 /**
6363 * Determines wheter the connection is open or not
6464 */
65- private boolean connectionClosed = false ;
65+ private volatile boolean connectionClosed = false ;
6666
6767 /**
6868 * The listener to notify of WebSocketImpl events.
6969 */
70- private WebSocketListener wsl ;
70+ private final WebSocketListener wsl ;
7171 /**
7272 * Queue of buffers that need to be sent to the client.
7373 */
74- public BlockingQueue <ByteBuffer > outQueue ;
74+ public final BlockingQueue <ByteBuffer > outQueue ;
7575
7676 private Draft draft = null ;
7777
@@ -85,7 +85,7 @@ public class WebSocketImpl extends WebSocket {
8585
8686 private ByteBuffer tmpHandshakeBytes ;
8787
88- public BlockingQueue <ByteBuffer > in ;
88+ public final BlockingQueue <ByteBuffer > in ;
8989
9090 public volatile WebSocketWorker worker ;
9191
0 commit comments