createTaskWithTimeout: Don't log expiration if task threw (#1412)

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-08-30 13:33:55 -07:00 committed by GitHub
parent 3f7fbd93d5
commit 46b64e306f
3 changed files with 30 additions and 4 deletions

View file

@ -40272,7 +40272,13 @@ libsignal.ProvisioningCipher = function() {
return reject(error);
};
var promise = task();
var promise;
try {
promise = task();
} catch(error) {
clearTimer();
throw error;
}
if (!promise || !promise.then) {
clearTimer();
complete = true;