\r
sendStickyBroadcast(true, null); // message to signal the start to the UI\r
\r
- PropFindMethod query;\r
+ PropFindMethod query = null;\r
try {\r
mCurrentSyncTime = System.currentTimeMillis();\r
query = new PropFindMethod(getUri().toString() + "/");\r
// TODO update syncResult\r
Log.e(TAG, "problem while synchronizing owncloud account " + account.name, t);\r
t.printStackTrace();\r
+ \r
+ } finally {\r
+ if (query != null)\r
+ query.releaseConnection(); // let the connection available for other methods\r
}\r
\r
/* Commented code for ugly performance tests\r
}\r
\r
private void fetchData(String uri, SyncResult syncResult, long parentId) {\r
+ PropFindMethod query = null;\r
try {\r
Log.d(TAG, "fetching " + uri);\r
\r
// remote request \r
- PropFindMethod query = new PropFindMethod(uri);\r
+ query = new PropFindMethod(uri);\r
/* Commented code for ugly performance tests\r
long responseDelay = System.currentTimeMillis();\r
*/\r
if (mDelaysIndex >= MAX_DELAYS)\r
mDelaysIndex = 0;\r
*/\r
- \r
-\r
\r
} catch (OperationCanceledException e) {\r
e.printStackTrace();\r
// TODO update syncResult\r
Log.e(TAG, "problem while synchronizing owncloud account " + mAccount.name, t);\r
t.printStackTrace();\r
+ \r
+ } finally {\r
+ if (query != null)\r
+ query.releaseConnection(); // let the connection available for other methods\r
}\r
}\r
\r