aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-02-07 12:02:10 +0300
committerGravatar Vitaly Takmazov2017-02-07 12:02:10 +0300
commit853b60c7229ffccd1d9e40b79ff08cae822e49b9 (patch)
tree437eca80de2bb34a5a0189a32848e9c983653b62 /juick-xmpp/src/main
parent698237a43fdec147003c471c8a9152f839acf28f (diff)
juick-xmpp: enable ping manager
Diffstat (limited to 'juick-xmpp/src/main')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java b/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java
index 638f12af..0db1f4a7 100644
--- a/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java
+++ b/juick-xmpp/src/main/java/com/juick/components/XMPPConnection.java
@@ -12,6 +12,7 @@ import rocks.xmpp.core.stanza.model.client.ClientMessage;
import rocks.xmpp.extensions.component.accept.ExternalComponent;
import rocks.xmpp.extensions.nick.model.Nickname;
import rocks.xmpp.extensions.oob.model.x.OobX;
+import rocks.xmpp.extensions.ping.PingManager;
import rocks.xmpp.util.XmppUtils;
import javax.xml.bind.JAXBException;
@@ -37,6 +38,8 @@ public class XMPPConnection implements AutoCloseable {
this.xmpp = s2s;
logger.info("stream router start");
router = ExternalComponent.create(componentName, password, xmpp.getSession().getConfiguration(), "localhost", componentPort);
+ PingManager pingManager = router.getManager(PingManager.class);
+ pingManager.setEnabled(true);
router.addInboundMessageListener(e -> {
Message message = e.getMessage();
Jid jid = message.getTo();