mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-11-22 12:16:21 +03:00
Fixed a silly error i made
This commit is contained in:
parent
1f1f4c847f
commit
45f3c95da1
2 changed files with 4 additions and 3 deletions
|
@ -19,8 +19,8 @@ class Handler {
|
||||||
|
|
||||||
const _request = request(url, {timeout: this.options.timeout || 10000});
|
const _request = request(url, {timeout: this.options.timeout || 10000});
|
||||||
|
|
||||||
_request.on('error', function(error) {
|
_request.on('error', (error) => {
|
||||||
this.client.emit('debug', `[MCLC]: Failed to download asset to ${path.join(directory, name)} due to\n${e}`);
|
this.client.emit('debug', `[MCLC]: Failed to download asset to ${path.join(directory, name)} due to\n${error}`);
|
||||||
resolve({
|
resolve({
|
||||||
failed: true,
|
failed: true,
|
||||||
asset: {
|
asset: {
|
||||||
|
@ -136,6 +136,7 @@ class Handler {
|
||||||
|
|
||||||
// why do we have this? B/c sometimes Minecraft's resource site times out!
|
// why do we have this? B/c sometimes Minecraft's resource site times out!
|
||||||
if(failed) {
|
if(failed) {
|
||||||
|
this.client.emit('debug', '[MCLC]: Attempting to download failed assets');
|
||||||
await Promise.all(failed.map(async asset => await this.downloadAsync(asset.url, asset.directory, asset.name)))
|
await Promise.all(failed.map(async asset => await this.downloadAsync(asset.url, asset.directory, asset.name)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "minecraft-launcher-core",
|
"name": "minecraft-launcher-core",
|
||||||
"version": "3.6.1",
|
"version": "3.6.2",
|
||||||
"description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS",
|
"description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue