From 3c9dfc195ead1f042e3cebe4f54eb9975fbe77b3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 1 May 2020 18:25:25 +0100 Subject: [PATCH] Increase timeout for 2nd phase of Olm session creation The timeouts on the two phases of olm session creation are 2 and 10 seconds respectively, so sessions will fail if servers take more than 10s to respond. Now that we have two phases, we can afford to wait longer on the second one because the user's isn't waiting for it to finish before the message will send, so increase it to 30s so servers have more of a chance to respond. --- src/crypto/algorithms/megolm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/algorithms/megolm.js b/src/crypto/algorithms/megolm.js index 6baf186de..49525b2bc 100644 --- a/src/crypto/algorithms/megolm.js +++ b/src/crypto/algorithms/megolm.js @@ -311,7 +311,7 @@ MegolmEncryption.prototype._ensureOutboundSession = async function( } await this._shareKeyWithDevices( - session, key, payload, retryDevices, failedDevices, + session, key, payload, retryDevices, failedDevices, 30000, ); await this._notifyFailedOlmDevices(session, key, failedDevices);