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
System.out.println("Closing connection due to no pong received: " + conn.toString());
170
-
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");
System.out.println( "Closing connection due to no pong received: " + conn.toString() );
176
+
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" );
174
177
} else {
175
-
if (WebSocketImpl.DEBUG)
176
-
System.out.println("Trying to ping a non open connection: " + conn.toString());
178
+
if( webSocketImpl.isOpen() ) {
179
+
webSocketImpl.sendPing();
180
+
} else {
181
+
if( WebSocketImpl.DEBUG )
182
+
System.out.println( "Trying to ping a non open connection: " + conn.toString() );
183
+
}
177
184
}
178
185
}
179
186
}
187
+
} catch ( Exceptione ) {
188
+
if (WebSocketImpl.DEBUG)
189
+
System.out.println("Exception during connection lost ping: " + e.getMessage());
0 commit comments