add comment how timeouts interact with the reconnector

This commit is contained in:
Bruno Windels 2020-09-25 10:45:41 +02:00
parent e175e9ac8b
commit 27a8ef4604

View File

@ -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);
}