From 27a8ef46045244a9949e921c9b448ee6e174add6 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 25 Sep 2020 10:45:41 +0200 Subject: [PATCH] add comment how timeouts interact with the reconnector --- src/matrix/net/HomeServerApi.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/matrix/net/HomeServerApi.js b/src/matrix/net/HomeServerApi.js index 83007953..3c5eda8a 100644 --- a/src/matrix/net/HomeServerApi.js +++ b/src/matrix/net/HomeServerApi.js @@ -82,6 +82,10 @@ export class HomeServerApi { if (this._reconnector) { wrapper.response().catch(err => { + // Some endpoints such as /sync legitimately time-out + // (which is also reported as a ConnectionError) and will re-attempt, + // but spinning up the reconnector in this case is ok, + // as all code ran on session and sync start should be reentrant if (err.name === "ConnectionError") { this._reconnector.onRequestFailed(this); }