Fixes related to offline startup.

Fixed incorrect function name for local distro index loading.
Fixed mojang tooltip not showing statuses when offline.
Added timeout of 2500ms to news loading, remote distro index retrieval, and mojang status loading.
Updates async to fix lodash vulnerability.
This commit is contained in:
Daniel Scalzi
2018-05-22 08:41:22 -04:00
parent ba916aa953
commit a67dac23cf
6 changed files with 79 additions and 56 deletions

View File

@@ -382,8 +382,12 @@ class AssetGuard extends EventEmitter {
static refreshDistributionDataRemote(launcherPath){
return new Promise((resolve, reject) => {
const distroURL = 'http://mc.westeroscraft.com/WesterosCraftLauncher/westeroscraft.json'
const opts = {
url: distroURL,
timeout: 2500
}
const distroDest = path.join(launcherPath, 'westeroscraft.json')
request(distroURL, (error, resp, body) => {
request(opts, (error, resp, body) => {
if(!error){
distributionData = JSON.parse(body)