Skip to content

Commit 13762a3

Browse files
author
tox
committed
Applied diff from Gottox#44
1 parent fc80d8e commit 13762a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/io/socket/IOConnection.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public void run() {
210210
public static void setSslContext(SSLContext sslContext) {
211211
IOConnection.sslContext = sslContext;
212212
}
213-
213+
214214
/**
215215
* Get the socket factory used for SSL connections.
216216
*
@@ -484,7 +484,7 @@ private synchronized void resetTimeout() {
484484
if (heartbeatTimeoutTask != null) {
485485
heartbeatTimeoutTask.cancel();
486486
}
487-
if(getState() != STATE_INVALID) {
487+
if (getState() != STATE_INVALID) {
488488
heartbeatTimeoutTask = new HearbeatTimeoutTask();
489489
backgroundTimer.schedule(heartbeatTimeoutTask, closingTimeout
490490
+ heartbeatTimeout);
@@ -863,7 +863,8 @@ private synchronized int getState() {
863863
* the new state
864864
*/
865865
private synchronized void setState(int state) {
866-
this.state = state;
866+
if (getState() != STATE_INVALID)
867+
this.state = state;
867868
}
868869

869870
/**

0 commit comments

Comments
 (0)