throw error on sendSessionRequest and log it in sendSessionRequestIfNeeded

pull/1166/head
Audric Ackermann 5 years ago
parent b9aa0ad8d5
commit 73c4020daf
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -99,7 +99,11 @@ export class SessionProtocol {
timestamp: Date.now(),
});
return SessionProtocol.sendSessionRequest(sessionReset, device);
try {
await SessionProtocol.sendSessionRequest(sessionReset, device);
} catch (error) {
window.console.warn('Failed to send session request to:', device, error);
}
}
/** */
@ -131,8 +135,7 @@ export class SessionProtocol {
await MessageSender.send(rawMessage);
await SessionProtocol.updateSentSessionTimestamp(device, timestamp);
} catch (e) {
// console.log('Failed to send session request to:', device);
// console.log('e:', e);
throw e;
} finally {
SessionProtocol.pendingSendSessionsTimestamp.delete(device);
}

Loading…
Cancel
Save