Fix a case that would leak connections if an exception happens

Change-Id: I9f50911344e04f22e15bf9ba0c95f4e1b1422923
This commit is contained in:
Martin Hibdon 2014-01-03 14:31:33 -08:00
parent ff1ee36cb5
commit 9fe8131c3f
1 changed files with 3 additions and 3 deletions

View File

@ -418,13 +418,13 @@ public abstract class EmailServiceStub extends IEmailService.Stub implements IEm
if (localFolderCursor != null) {
localFolderCursor.close();
}
if (store != null) {
store.closeConnections();
}
// If we just created the inbox, sync it
if (inboxId != -1) {
startSync(inboxId, true, 0);
}
if (store != null) {
store.closeConnections();
}
}
}