diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-11-18 13:47:39 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-11-18 14:00:05 +0100 |
commit | d68b7cfcfcb5677d7ca12090abe8364b78904ca7 (patch) | |
tree | cc0ee079ff3b1cf303525e15d0cadbec693886e7 /src/main/java/eu/siacs | |
parent | fef601b4ae1c68b36f5078a965d28930b5755528 (diff) |
issue ping after network change
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 4 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index d22ed802..10155a14 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -615,7 +615,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, @@ -698,7 +698,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) { diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index ce5a5b60..86c9a13e 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -950,7 +950,7 @@ public class XmppConnection implements Runnable { } public void resetEverything() { - resetAttemptCount(); + resetAttemptCount(true); resetStreamId(); clearIqCallbacks(); mStanzaQueue.clear(); |