Merge commit '8ed23be08f34ba11e5bf0acd98d1419df893a0bc' into kraken * commit '8ed23be08f34ba11e5bf0acd98d1419df893a0bc': Shutdown all connections when sync service is hung
This commit is contained in:
commit
504bd426c8
@ -1177,6 +1177,11 @@ public class SyncManager extends Service implements Runnable {
|
|||||||
return sClientConnectionManager;
|
return sClientConnectionManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static private synchronized void shutdownConnectionManager() {
|
||||||
|
sClientConnectionManager.shutdown();
|
||||||
|
sClientConnectionManager = null;
|
||||||
|
}
|
||||||
|
|
||||||
public static void stopAccountSyncs(long acctId) {
|
public static void stopAccountSyncs(long acctId) {
|
||||||
SyncManager syncManager = INSTANCE;
|
SyncManager syncManager = INSTANCE;
|
||||||
if (syncManager != null) {
|
if (syncManager != null) {
|
||||||
@ -1448,6 +1453,9 @@ public class SyncManager extends Service implements Runnable {
|
|||||||
// thread to do the work
|
// thread to do the work
|
||||||
log("Alarm failed; releasing mailbox");
|
log("Alarm failed; releasing mailbox");
|
||||||
syncManager.releaseMailbox(id);
|
syncManager.releaseMailbox(id);
|
||||||
|
// Shutdown the connection manager; this should close all of our
|
||||||
|
// sockets and generate IOExceptions all around.
|
||||||
|
syncManager.shutdownConnectionManager();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}).start();
|
}}).start();
|
||||||
|
Loading…
Reference in New Issue
Block a user