forked from mystiq/hydrogen-web
add comment how timeouts interact with the reconnector
This commit is contained in:
parent
e175e9ac8b
commit
27a8ef4604
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue