Skip to content

Commit a8bc1bf

Browse files
authored
Merge pull request TooTallNate#809 from fightyz/bugfix/readystate-synchronize
Synchronize the readState field
2 parents 033a1bb + 3d8eff0 commit a8bc1bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

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

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

0 commit comments

Comments
 (0)