mirror of
https://github.com/trympet/nextcloud-artifacts-action.git
synced 2026-08-24 08:41:07 +02:00
fix IO await
This commit is contained in:
Vendored
+3
@@ -610,12 +610,15 @@ class NextcloudClient {
|
||||
headers: { 'Content-Length': fileStat.size.toString() }
|
||||
});
|
||||
fileStream.pipe(remoteStream);
|
||||
// see: https://github.com/nodejs/node/issues/22088
|
||||
const timer = setTimeout(() => { }, 20000);
|
||||
await new Promise((resolve, reject) => {
|
||||
fileStream.on('error', e => reject(e)).on('close', () => resolve());
|
||||
});
|
||||
await new Promise((resolve, reject) => {
|
||||
remoteStream.on('error', e => reject(e)).on('close', () => resolve());
|
||||
});
|
||||
clearTimeout(timer);
|
||||
return remoteFilePath;
|
||||
}
|
||||
async shareFile(remoteFilePath) {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user