From 9f08a32ffb4535ffda214781206b5adced77e991 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 30 Jun 2019 20:08:28 +0200 Subject: [PATCH] include remote server errors in errors that should trigger a self ping --- .../java/eu/siacs/conversations/parser/MessageParser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 85483c1b7..c2347d454 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -266,12 +266,12 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece Message.STATUS_SEND_FAILED, extractErrorMessage(packet)); final Element error = packet.findChild("error"); - final boolean notAcceptable = error != null && error.hasChild("not-acceptable"); - if (notAcceptable) { + final boolean pingWorthyError = error != null && (error.hasChild("not-acceptable") || error.hasChild("remote-server-timeout") || error.hasChild("remote-server-not-found")); + if (pingWorthyError) { Conversation conversation = mXmppConnectionService.find(account,from); if (conversation != null && conversation.getMode() == Conversational.MODE_MULTI) { if (conversation.getMucOptions().online()) { - Log.d(Config.LOGTAG,account.getJid().asBareJid()+": received not-acceptable error for seemingly online muc at "+from); + Log.d(Config.LOGTAG,account.getJid().asBareJid()+": received ping worthy error for seemingly online muc at "+from); mXmppConnectionService.mucSelfPingAndRejoin(conversation); } }