From 1e8aa81c020db404966c19c06e909326edc83aea Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 11 Aug 2006 05:51:55 +0000 Subject: [PATCH] Fixes #108, Delay repository check by a few seconds if DB transaction is already in progress --- chrome/chromeFiles/content/scholar/xpcom/schema.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/chromeFiles/content/scholar/xpcom/schema.js b/chrome/chromeFiles/content/scholar/xpcom/schema.js index 449b63747..95eff21bb 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/schema.js +++ b/chrome/chromeFiles/content/scholar/xpcom/schema.js @@ -72,6 +72,13 @@ Scholar.Schema = new function(){ } } + // If transaction already in progress, delay by a few seconds + if (Scholar.DB.transactionInProgress()){ + Scholar.debug('Transaction in progress -- delaying repository check', 4) + _setRepositoryTimer(30); + return false; + } + // Get the last timestamp we got from the server var lastUpdated = _getDBVersion('repository');