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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user