fix(rn,config) increase config load timeout to 10 seconds

This commit is contained in:
Saúl Ibarra Corretgé 2020-09-30 09:46:35 +02:00 committed by Saúl Ibarra Corretgé
parent 49548ba564
commit c261682a29
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ const { JavaScriptSandbox } = NativeModules;
*/
export async function loadConfig(url: string): Promise<Object> {
try {
const configTxt = await loadScript(url, 2.5 * 1000 /* Timeout in ms */, true /* skipeval */);
const configTxt = await loadScript(url, 10 * 1000 /* Timeout in ms */, true /* skipeval */);
const configJson = await JavaScriptSandbox.evaluate(`${configTxt}\nJSON.stringify(config);`);
const config = JSON.parse(configJson);