fix(rn,config) increase config load timeout to 10 seconds
This commit is contained in:
parent
49548ba564
commit
c261682a29
|
@ -18,7 +18,7 @@ const { JavaScriptSandbox } = NativeModules;
|
||||||
*/
|
*/
|
||||||
export async function loadConfig(url: string): Promise<Object> {
|
export async function loadConfig(url: string): Promise<Object> {
|
||||||
try {
|
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 configJson = await JavaScriptSandbox.evaluate(`${configTxt}\nJSON.stringify(config);`);
|
||||||
const config = JSON.parse(configJson);
|
const config = JSON.parse(configJson);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue