You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.trace("Closing connection due to no pong received: {}", conn);
178
-
webSocketImpl.closeConnection( CloseFrame.ABNORMAL_CLOSE, "The connection was closed because the other endpoint did not respond with a pong in time. For more information check: https://github.com/TooTallNate/Java-WebSocket/wiki/Lost-connection-detection" );
179
-
} else {
180
-
if( webSocketImpl.isOpen() ) {
181
-
webSocketImpl.sendPing();
182
-
} else {
183
-
log.trace("Trying to ping a non open connection: {}", conn);
184
-
}
185
-
}
186
-
}
173
+
executeConnectionLostDetection(conn, current);
187
174
}
188
175
} catch ( Exceptione ) {
189
176
//Ignore this exception
@@ -195,6 +182,28 @@ public void run() {
195
182
196
183
}
197
184
185
+
/**
186
+
* Send a ping to the endpoint or close the connection since the other endpoint did not respond with a ping
log.trace("Closing connection due to no pong received: {}", webSocketImpl);
197
+
webSocketImpl.closeConnection( CloseFrame.ABNORMAL_CLOSE, "The connection was closed because the other endpoint did not respond with a pong in time. For more information check: https://github.com/TooTallNate/Java-WebSocket/wiki/Lost-connection-detection" );
198
+
} else {
199
+
if( webSocketImpl.isOpen() ) {
200
+
webSocketImpl.sendPing();
201
+
} else {
202
+
log.trace("Trying to ping a non open connection: {}", webSocketImpl);
203
+
}
204
+
}
205
+
}
206
+
198
207
/**
199
208
* Getter to get all the currently available connections
0 commit comments