mirror of https://github.com/VERT-sh/VERT.git
fix: download fails
omfg you stupid only close the websocket after its been downloaded so ws.onclose doesnt kill your download
This commit is contained in:
parent
f8f54da581
commit
c505aefd06
|
|
@ -947,7 +947,6 @@ export class VertdConverter extends Converter {
|
||||||
|
|
||||||
case "jobFinished": {
|
case "jobFinished": {
|
||||||
this.log(`job finished for file ${input.name}`);
|
this.log(`job finished for file ${input.name}`);
|
||||||
ws.close();
|
|
||||||
try {
|
try {
|
||||||
const url = `${apiUrl}/api/download/${msg.data.jobId}/${uploadRes.auth}`;
|
const url = `${apiUrl}/api/download/${msg.data.jobId}/${uploadRes.auth}`;
|
||||||
this.log(`downloading from ${url}`);
|
this.log(`downloading from ${url}`);
|
||||||
|
|
@ -974,6 +973,8 @@ export class VertdConverter extends Converter {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (hash) this.failure(hash);
|
if (hash) this.failure(hash);
|
||||||
rejectConversion(e);
|
rejectConversion(e);
|
||||||
|
} finally {
|
||||||
|
ws.close();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue