when we abort a lock request because we already hold a token, reset _lockAllowed to allow further requests for locks
authorDan Mills <thunder@mozilla.com>
Thu, 26 Jun 2008 16:26:14 -0700
changeset 44777 760741a52fe7a261ef8c93cb05c1b0094fc4f92c
parent 44776 cb86d2934d9e67adbacc1ec964a99c0d624fe35f
child 44780 5256cb9e1cb4cbc981c06cea13ee1dcb69f1a607
child 44781 7a757923e07af6978411193a676b64354672db2b
push idunknown
push userunknown
push dateunknown
when we abort a lock request because we already hold a token, reset _lockAllowed to allow further requests for locks
services/sync/modules/dav.js
--- a/services/sync/modules/dav.js
+++ b/services/sync/modules/dav.js
@@ -355,16 +355,17 @@ DAVCollection.prototype = {
 
     this._log.trace("Acquiring lock");
     if (!this._lockAllowed)
       throw {message: "Cannot acquire lock (internal lock)"};
     this._lockAllowed = false;
 
     if (DAVLocks['default']) {
       this._log.debug("Lock called, but we already hold a token");
+      this._lockAllowed = true;
       self.done();
       return;
     }
 
     this.LOCK("lock",
               "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" +
               "<D:lockinfo xmlns:D=\"DAV:\">\n" +
               "  <D:locktype><D:write/></D:locktype>\n" +
@@ -390,17 +391,17 @@ DAVCollection.prototype = {
       this._log.warn("Could not acquire lock");
       this._lockAllowed = true;
       self.done();
       return;
     }
 
     this._log.trace("Lock acquired");
     this._lockAllowed = true;
-    
+
     self.done(DAVLocks['default']);
   },
 
   unlock: function DC_unlock() {
     let self = yield;
 
     this._log.trace("Releasing lock");