diff --git a/src/file.ts b/src/file.ts index 8b02905ca..49c673337 100644 --- a/src/file.ts +++ b/src/file.ts @@ -1530,12 +1530,15 @@ class File extends ServiceObject { } const handoffStream = new PassThrough({ - final: async cb => { + final: cb => { // Preserving `onComplete`'s ability to // destroy `throughStream` before pipeline // attempts to. - await onComplete(null); - cb(); + onComplete(null) + .then(() => { + cb(); + }) + .catch(cb); }, });