Increase the token refresh timeout to 10 sec (#1584)

This commit is contained in:
Constantin S. Pan 2017-12-21 14:14:07 +01:00 committed by GitHub
parent 839d8563a1
commit 1b0f6c0b21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,8 @@ X.Y.Z Release notes
### Bug fixes
* Fix a bug where `Realm.open` could unexpectedly raise a "Realm at path ... already opened with different schema version" error.
* Increased request timeout for token refresh requests to 10 seconds. This
should help with failing token refreshes on a loaded server.
### Internal
* None

View File

@ -81,7 +81,7 @@ function refreshAccessToken(user, localRealmPath, realmUrl) {
headers: postHeaders,
// FIXME: This timeout appears to be necessary in order for some requests to be sent at all.
// See https://github.com/realm/realm-js-private/issues/338 for details.
timeout: 1000.0
timeout: 10000.0
};
performFetch(url, options)
.then((response) => response.json().then((json) => { return { response, json }; }))