aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-16 13:29:04 +0300
committerGravatar Vitaly Takmazov2018-03-16 13:29:04 +0300
commit6e3946471d600d5f2d96b8cf73ab0cb436c0dfd3 (patch)
tree3f741cb85796677086cdf845723e12161b078a03 /juick-server
parentf5d6d34479da7ba45403539af7d31d8b9b5f10dd (diff)
server: debug xmpp disconnects
Diffstat (limited to 'juick-server')
-rw-r--r--juick-server/src/main/java/com/juick/server/ServerManager.java10
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPConnection.java1
2 files changed, 6 insertions, 5 deletions
diff --git a/juick-server/src/main/java/com/juick/server/ServerManager.java b/juick-server/src/main/java/com/juick/server/ServerManager.java
index 1db31e23..30740a76 100644
--- a/juick-server/src/main/java/com/juick/server/ServerManager.java
+++ b/juick-server/src/main/java/com/juick/server/ServerManager.java
@@ -185,7 +185,7 @@ public class ServerManager implements AutoCloseable {
(!c.legacy && c.visitor.getUid() == uid_to) || c.visitor.getName().equals(serviceUser))
.forEach(c -> {
try {
- logger.info("sending pm to {}", c.visitor.getUid());
+ logger.debug("sending pm to {}", c.visitor.getUid());
c.session.sendMessage(new TextMessage(json));
} catch (IOException e) {
logger.warn("ws error", e);
@@ -205,7 +205,7 @@ public class ServerManager implements AutoCloseable {
|| (!c.legacy && uids.contains(c.visitor.getUid()))) // subscriptions
.forEach(c -> {
try {
- logger.info("sending message to {}", c.visitor.getUid());
+ logger.debug("sending message to {}", c.visitor.getUid());
c.session.sendMessage(new TextMessage(json));
} catch (IOException e) {
logger.warn("ws error", e);
@@ -215,7 +215,7 @@ public class ServerManager implements AutoCloseable {
c.legacy && c.allMessages) // legacy all posts
.forEach(c -> {
try {
- logger.info("sending message to legacy client {}", c.visitor.getUid());
+ logger.debug("sending message to legacy client {}", c.visitor.getUid());
c.session.sendMessage(new TextMessage(json));
} catch (IOException e) {
logger.warn("ws error", e);
@@ -236,7 +236,7 @@ public class ServerManager implements AutoCloseable {
|| (!c.legacy && threadUsers.contains(c.visitor.getUid()))) // subscriptions
.forEach(c -> {
try {
- logger.info("sending reply to {}", c.visitor.getUid());
+ logger.debug("sending reply to {}", c.visitor.getUid());
c.session.sendMessage(new TextMessage(json));
} catch (IOException e) {
logger.warn("ws error", e);
@@ -246,7 +246,7 @@ public class ServerManager implements AutoCloseable {
(c.legacy && c.allReplies) || (c.legacy && c.MID == jmsg.getMid())) // legacy replies
.forEach(c -> {
try {
- logger.info("sending reply to legacy client {}", c.visitor.getUid());
+ logger.debug("sending reply to legacy client {}", c.visitor.getUid());
c.session.sendMessage(new TextMessage(json));
} catch (IOException e) {
logger.warn("ws error", e);
diff --git a/juick-server/src/main/java/com/juick/server/XMPPConnection.java b/juick-server/src/main/java/com/juick/server/XMPPConnection.java
index 91f66365..4bfcd833 100644
--- a/juick-server/src/main/java/com/juick/server/XMPPConnection.java
+++ b/juick-server/src/main/java/com/juick/server/XMPPConnection.java
@@ -152,6 +152,7 @@ public class XMPPConnection implements AutoCloseable {
router.addInboundMessageListener(e -> {
Message message = e.getMessage();
Jid jid = message.getTo();
+ logger.info("XMPP is alive and receive message");
if (jid.getDomain().equals(router.getDomain().toEscapedString())) {
com.juick.Message jmsg = message.getExtension(com.juick.Message.class);
if (jmsg != null) {