Skip to content

Commit 53fbddf

Browse files
committed
Always destroy fileStream after successful/failed upload
1 parent f76e84d commit 53fbddf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

storage-node/src/services/s3/AwsConnectionHandler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ export class AwsConnectionHandler implements IConnectionHandler<StorageClass> {
142142
try {
143143
const resp = await this.client.send(command)
144144
return resp
145-
} catch (e) {
145+
} finally {
146146
fileStream.destroy()
147-
throw e
148147
}
149148
}
150149

0 commit comments

Comments
 (0)