Skip to content

Commit 3d8eff0

Browse files
author
Yang Zhou
committed
Synchronize the readState field
1 parent c25d49a commit 3d8eff0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/java/org/java_websocket/WebSocketImpl.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public class WebSocketImpl implements WebSocket {
114114
/**
115115
* The current state of the connection
116116
*/
117-
private ReadyState readyState = ReadyState.NOT_YET_CONNECTED;
117+
private volatile ReadyState readyState = ReadyState.NOT_YET_CONNECTED;
118118

119119
/**
120120
* A list of drafts available for this websocket

0 commit comments

Comments
 (0)