aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-21 09:07:58 +0300
committerGravatar Vitaly Takmazov2018-09-21 09:07:58 +0300
commitd9bc70ab3c317801beae801df7b7da5af622f30c (patch)
tree64d91898edca3847c26e65264fef5f9a81e74d8d
parentd84a8526760104f8f836f5fda397e82f5e442fee (diff)
log websocket pings at info level
-rw-r--r--juick-notifications/src/main/java/com/juick/components/Notifications.java2
-rw-r--r--juick-notifications/src/main/java/com/juick/components/service/JuickServerReconnectManager.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/juick-notifications/src/main/java/com/juick/components/Notifications.java b/juick-notifications/src/main/java/com/juick/components/Notifications.java
index 79afe8fa..855c9091 100644
--- a/juick-notifications/src/main/java/com/juick/components/Notifications.java
+++ b/juick-notifications/src/main/java/com/juick/components/Notifications.java
@@ -334,7 +334,7 @@ public class Notifications extends TextWebSocketHandler implements NotificationC
public void ping() throws IOException {
if (!closeFlag.get()) {
if (session != null && session.isOpen()) {
- logger.debug("Sending WebSocket ping");
+ logger.info("Sending WebSocket ping");
session.sendMessage(new PingMessage());
} else {
applicationEventPublisher.publishEvent(new DisconnectedEvent(this));
diff --git a/juick-notifications/src/main/java/com/juick/components/service/JuickServerReconnectManager.java b/juick-notifications/src/main/java/com/juick/components/service/JuickServerReconnectManager.java
index f83a3aa0..1f19eec9 100644
--- a/juick-notifications/src/main/java/com/juick/components/service/JuickServerReconnectManager.java
+++ b/juick-notifications/src/main/java/com/juick/components/service/JuickServerReconnectManager.java
@@ -7,6 +7,7 @@ import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.client.WebSocketConnectionManager;
+import javax.annotation.Nonnull;
import javax.inject.Inject;
@Component
@@ -15,7 +16,7 @@ public class JuickServerReconnectManager implements ApplicationListener<Disconne
@Inject
private WebSocketConnectionManager webSocketConnectionManager;
@Override
- public void onApplicationEvent(DisconnectedEvent event) {
+ public void onApplicationEvent(@Nonnull DisconnectedEvent event) {
logger.info("retrying...");
webSocketConnectionManager.stop();
webSocketConnectionManager.start();