Skip to content

Commit

Permalink
don't reject on error
Browse files Browse the repository at this point in the history
because we ignore it anyways, and it makes an unrelated unit test fail
  • Loading branch information
uhoreg committed Mar 12, 2019
1 parent 79ca235 commit 8c2001a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/crypto/olmlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ module.exports.ensureOlmSessionsForDevices = async function(
);
} catch (e) {
for (const resolver of Object.values(resolveSession)) {
resolver.reject(e);
resolver.resolve();
}
logger.log("failed to claim one-time keys", e, devicesWithoutSession);
throw e;
Expand Down Expand Up @@ -237,7 +237,7 @@ module.exports.ensureOlmSessionsForDevices = async function(
const msg = "No one-time keys (alg=" + oneTimeKeyAlgorithm +
") for device " + userId + ":" + deviceId;
logger.warn(msg);
resolveSession[key].reject(new Error(msg));
resolveSession[key].resolve();
continue;
}

Expand All @@ -248,7 +248,7 @@ module.exports.ensureOlmSessionsForDevices = async function(
resolveSession[key].resolve(sid);
result[userId][deviceId].sessionId = sid;
}, (e) => {
resolveSession[key].reject(e);
resolveSession[key].resolve();
throw e;
}),
);
Expand Down

0 comments on commit 8c2001a

Please sign in to comment.