streamingfast / dstore

Blob stores abstractions. Supports AWS S3, Google Storage, Azure Blob File Storage, and local FS
https://dfuse.io
Apache License 2.0
11 stars 10 forks source link

Close s3 request body in unbuffered mode. Fixes #11 #12

Closed johnkozan closed 1 year ago

johnkozan commented 1 year ago

I'm not sure this is the actual fix

maoueh commented 1 year ago

I'm pretty sure this fix is incorrect actually. The OpenObject is meant to return a reader and the caller has the responsibility to Close the received reader, similar to what you would do with a standard file.

Closing the Body right away will probably leads to the file being unable to be read.

maoueh commented 1 year ago

Ahah I was writing the answer as you just closed it :)