diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index d9bf5f7f0..d0b2718d4 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -728,7 +728,7 @@ public class XmppConnectionService extends Service { } synchronized (this) { this.wakeLock.acquire(); - boolean pingNow = false; + boolean pingNow = ConnectivityManager.CONNECTIVITY_ACTION.equals(action); HashSet<Account> pingCandidates = new HashSet<>(); for (Account account : accounts) { pingNow |= processAccountState(account, @@ -756,8 +756,6 @@ public class XmppConnectionService extends Service { } private boolean processAccountState(Account account, boolean interactive, boolean isUiAction, boolean isAccountPushed, HashSet<Account> pingCandidates) { - - boolean pingNow = false; if (!account.isOptionSet(Account.OPTION_DISABLED)) { if (!hasInternetConnection()) { @@ -814,7 +812,7 @@ public class XmppConnectionService extends Service { long discoTimeout = Config.CONNECT_DISCO_TIMEOUT - secondsSinceLastDisco; long timeout = Config.CONNECT_TIMEOUT - secondsSinceLastConnect; if (timeout < 0) { - Log.d(Config.LOGTAG, account.getJid() + ": time out during connect reconnecting"); + Log.d(Config.LOGTAG, account.getJid() + ": time out during connect reconnecting (secondsSinceLast="+secondsSinceLastConnect+")"); account.getXmppConnection().resetAttemptCount(false); reconnectAccount(account, true, interactive); } else if (discoTimeout < 0) { |