fix: sleep for 2 seconds to test for race case

This commit is contained in:
Tom Hu 2023-11-10 21:48:55 +11:00
parent 9167269e47
commit c3f1958bba
No known key found for this signature in database
GPG key ID: 79155678363963D2
3 changed files with 6 additions and 4 deletions

View file

@ -36,7 +36,8 @@ try {
const downloadUploader = (retries) => {
const filePath = fs.createWriteStream(filename, {flags: 'w'});
https.get(getBaseUrl(platform, uploaderVersion), (res) => {
https.get(getBaseUrl(platform, uploaderVersion), async (res) => {
await new Promise((r) => setTimeout(r, 2000));
res.pipe(filePath);
});
filePath