summaryrefslogtreecommitdiffstats
path: root/EssentialsXMPP
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-08-08 16:03:00 +0200
committersnowleo <schneeleo@gmail.com>2011-08-08 16:03:00 +0200
commit8185b05b5d8a1feb60e70ebbddb907e08dbeeed5 (patch)
tree69ccc6a27dc7c069b0c85a16e1993dca8e2b83d0 /EssentialsXMPP
parentb9fc6a0b2bd89d7dcd5b97540a03353a096b55bd (diff)
downloadEssentials-8185b05b5d8a1feb60e70ebbddb907e08dbeeed5.tar
Essentials-8185b05b5d8a1feb60e70ebbddb907e08dbeeed5.tar.gz
Essentials-8185b05b5d8a1feb60e70ebbddb907e08dbeeed5.tar.lz
Essentials-8185b05b5d8a1feb60e70ebbddb907e08dbeeed5.tar.xz
Essentials-8185b05b5d8a1feb60e70ebbddb907e08dbeeed5.zip
XMPP: reconnect to server, if connection is broken.
Diffstat (limited to 'EssentialsXMPP')
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
index 4ad3ad35d..f33f29416 100644
--- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
@@ -68,6 +68,10 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
}
if (chat != null)
{
+ if (!connection.isConnected()) {
+ disconnect();
+ connect();
+ }
chat.sendMessage(message.replaceAll("ยง[0-9a-f]", ""));
return true;
}