-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Describe what you would like to know or do
How to send a custom Ping message on connectionLostTimeout?
Describe the solution you'd considered
For creating a WS client, I am extending WebSocketClient. I did setConnectionLostTimeout to 30 seconds. and override the sendPing() method
| public void sendPing() { |
@Override
public void sendPing() {
log.info("Sending ping");
JsonObject pingObj = new JsonObject();
pingObj.addProperty("id", "NGenerated guid id");
pingObj.addProperty("type", "ping");
this.send(pingObj.toString());
}
I thought it would be simple, just to override sendPing(). But it is not the case. My overridden method never gets invoked. Rather it calls engine's sendPing()
| public void sendPing() { |
Additional context
It's not causing any connection close issue, but I am just looking for a way o customize the send ping message.