From ea67ca9adcc26adad2d9ff3e7427fdb98f149ad8 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Tue, 7 May 2019 15:38:18 -0230 Subject: [PATCH] Use custom fetch wrapper with timeout for fetch-with-cache --- ui/app/helpers/utils/fetch-with-cache.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/app/helpers/utils/fetch-with-cache.js b/ui/app/helpers/utils/fetch-with-cache.js index 5ace081b1ad0..ac641c3c4d09 100644 --- a/ui/app/helpers/utils/fetch-with-cache.js +++ b/ui/app/helpers/utils/fetch-with-cache.js @@ -2,6 +2,11 @@ import { loadLocalStorageData, saveLocalStorageData, } from '../../../lib/local-storage-helpers' +import http from './fetch' + +const fetch = http({ + timeout: 30000, +}) export default function fetchWithCache (url, opts, cacheRefreshTime = 360000) { const currentTime = Date.now()