aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java')
-rw-r--r--juick-server/src/main/java/com/juick/api/WebsocketManager.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/juick-server/src/main/java/com/juick/api/WebsocketManager.java b/juick-server/src/main/java/com/juick/api/WebsocketManager.java
index 40747e5a..2ed70b3c 100644
--- a/juick-server/src/main/java/com/juick/api/WebsocketManager.java
+++ b/juick-server/src/main/java/com/juick/api/WebsocketManager.java
@@ -77,27 +77,27 @@ public class WebsocketManager extends TextWebSocketHandler {
if (hash != null && hash.get(0).length() == 16) {
visitor = userService.getUserByHash(hash.get(0));
} else {
- logger.info("wrong hash for {} from {}", visitor.getUid(), hXRealIP);
+ logger.debug("wrong hash for {} from {}", visitor.getUid(), hXRealIP);
}
int MID = 0;
SocketSubscribed sockSubscr = null;
if (hLocation.getPath().equals("/ws/")) {
- logger.info("user {} connected", visitor.getUid());
+ logger.debug("user {} connected", visitor.getUid());
sockSubscr = new SocketSubscribed(session, hXRealIP, visitor, false);
} else if (hLocation.getPath().equals("/ws/_all")) {
- logger.info("user {} connected to legacy _all ({})", visitor.getUid(), hLocation.getPath());
+ logger.debug("user {} connected to legacy _all ({})", visitor.getUid(), hLocation.getPath());
sockSubscr = new SocketSubscribed(session, hXRealIP, visitor, true);
sockSubscr.allMessages = true;
} else if (hLocation.getPath().equals("/ws/_replies")) {
- logger.info("user {} connected to legacy _replies ({})", visitor.getUid(), hLocation.getPath());
+ logger.debug("user {} connected to legacy _replies ({})", visitor.getUid(), hLocation.getPath());
sockSubscr = new SocketSubscribed(session, hXRealIP, visitor, true);
sockSubscr.allReplies = true;
} else if (hLocation.getPath().matches("^/ws/(\\d)+$")) {
MID = NumberUtils.toInt(hLocation.getPath().substring(4), 0);
if (MID > 0) {
if (messagesService.canViewThread(MID, visitor.getUid())) {
- logger.info("user {} connected to legacy thread ({}) from {}", visitor.getUid(), MID, hXRealIP);
+ logger.debug("user {} connected to legacy thread ({}) from {}", visitor.getUid(), MID, hXRealIP);
sockSubscr = new SocketSubscribed(session, hXRealIP, visitor, true);
sockSubscr.MID = MID;
} else {
@@ -110,7 +110,7 @@ public class WebsocketManager extends TextWebSocketHandler {
if (sockSubscr != null) {
synchronized (clients) {
clients.add(sockSubscr);
- logger.info("{} clients connected", clients.size());
+ logger.debug("{} clients connected", clients.size());
}
} else {
throw new HttpBadRequestException();
@@ -120,9 +120,9 @@ public class WebsocketManager extends TextWebSocketHandler {
@Override
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {
synchronized (clients) {
- logger.info("session closed with status {}: {}", status.getCode(), status.getReason());
+ logger.debug("session closed with status {}: {}", status.getCode(), status.getReason());
clients.removeIf(c -> c.session.getId().equals(session.getId()));
- logger.info("{} clients connected", clients.size());
+ logger.debug("{} clients connected", clients.size());
}
}