We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4a215e commit 91ccf13Copy full SHA for 91ccf13
src/io/socket/IOConnection.java
@@ -471,13 +471,15 @@ private void invalidateTransport() {
471
/**
472
* Reset timeout.
473
*/
474
- private void resetTimeout() {
+ private synchronized void resetTimeout() {
475
if (heartbeatTimeoutTask != null) {
476
heartbeatTimeoutTask.cancel();
477
}
478
- heartbeatTimeoutTask = new HearbeatTimeoutTask();
479
- backgroundTimer.schedule(heartbeatTimeoutTask, closingTimeout
480
- + heartbeatTimeout);
+ if(getState() != STATE_INVALID) {
+ heartbeatTimeoutTask = new HearbeatTimeoutTask();
+ backgroundTimer.schedule(heartbeatTimeoutTask, closingTimeout
481
+ + heartbeatTimeout);
482
+ }
483
484
485
0 commit comments