sigh, my previous unlock change actually breaks unlock. fix fix fix.

This commit is contained in:
Dan Mills 2008-07-08 13:56:03 -07:00
parent 13c049d2de
commit b0bede9548

View File

@ -415,21 +415,27 @@ DAVCollection.prototype = {
return;
}
// Do this unconditionally, since code that calls unlock() doesn't
// really have much of an option if unlock fails. The only thing
// to do is wait for it to time out (and hope it didn't really
// fail)
if (DAVLocks['default'])
delete DAVLocks['default'];
try {
let resp = yield this.UNLOCK("lock", self.cb);
let resp = yield this.UNLOCK("lock", self.cb);
if (Utils.checkStatus(resp.status)) {
this._log.trace("Lock released");
self.done(true);
} else {
this._log.trace("Failed to release lock");
self.done(false);
}
if (Utils.checkStatus(resp.status)) {
this._log.trace("Lock released");
self.done(true);
} else {
this._log.trace("Failed to release lock");
self.done(false);
} catch (e) {
throw e;
} finally {
// Do this unconditionally, since code that calls unlock() doesn't
// really have much of an option if unlock fails. The only thing
// to do is wait for it to time out (and hope it didn't really
// fail)
if (DAVLocks['default'])
delete DAVLocks['default'];
}
},