clean up logging
This commit is contained in:
parent
195988398e
commit
c039ffcf35
|
@ -428,11 +428,11 @@ public class XmppConnectionService extends Service {
|
||||||
final int next = connection.getTimeToNextAttempt();
|
final int next = connection.getTimeToNextAttempt();
|
||||||
final boolean lowPingTimeoutMode = isInLowPingTimeoutMode(account);
|
final boolean lowPingTimeoutMode = isInLowPingTimeoutMode(account);
|
||||||
if (next <= 0) {
|
if (next <= 0) {
|
||||||
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. reconnecting now. lowPingTimeout=" + Boolean.toString(lowPingTimeoutMode));
|
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. reconnecting now. lowPingTimeout=" + lowPingTimeoutMode);
|
||||||
reconnectAccount(account, true, false);
|
reconnectAccount(account, true, false);
|
||||||
} else {
|
} else {
|
||||||
final int attempt = connection.getAttempt() + 1;
|
final int attempt = connection.getAttempt() + 1;
|
||||||
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. try again in " + next + "s for the " + attempt + " time. lowPingTimeout=" + Boolean.toString(lowPingTimeoutMode));
|
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. try again in " + next + "s for the " + attempt + " time. lowPingTimeout=" + lowPingTimeoutMode);
|
||||||
scheduleWakeUpCall(next, account.getUuid().hashCode());
|
scheduleWakeUpCall(next, account.getUuid().hashCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1522,7 +1522,6 @@ public class XmppConnectionService extends Service {
|
||||||
packet.addChild(ChatState.toElement(conversation.getOutgoingChatState()));
|
packet.addChild(ChatState.toElement(conversation.getOutgoingChatState()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.d(Config.LOGTAG,packet.toString());
|
|
||||||
sendMessagePacket(account, packet);
|
sendMessagePacket(account, packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1328,11 +1328,9 @@ public class XmppConnection implements Runnable {
|
||||||
throw new IOException();
|
throw new IOException();
|
||||||
} else if (streamError.hasChild("host-unknown")) {
|
} else if (streamError.hasChild("host-unknown")) {
|
||||||
throw new StateChangingException(Account.State.HOST_UNKNOWN);
|
throw new StateChangingException(Account.State.HOST_UNKNOWN);
|
||||||
} else if (streamError.hasChild("policy-violation")) { ;
|
} else if (streamError.hasChild("policy-violation")) {
|
||||||
final String text = streamError.findChildContent("text");
|
final String text = streamError.findChildContent("text");
|
||||||
if (text != null) {
|
Log.d(Config.LOGTAG,account.getJid().asBareJid()+": policy violation. "+text);
|
||||||
Log.d(Config.LOGTAG,account.getJid().asBareJid()+": policy violation. "+text);
|
|
||||||
}
|
|
||||||
throw new StateChangingException(Account.State.POLICY_VIOLATION);
|
throw new StateChangingException(Account.State.POLICY_VIOLATION);
|
||||||
} else {
|
} else {
|
||||||
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": stream error " + streamError.toString());
|
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": stream error " + streamError.toString());
|
||||||
|
|
Loading…
Reference in New Issue