FluentStorage icon indicating copy to clipboard operation
FluentStorage copied to clipboard

S3 Possible bug: underlying response stream not disposed

Open timothycoleman opened this issue 1 year ago • 0 comments

It appears that when reading from S3, the stream from the GetObjectResponse is not disposed.

https://github.com/robinrodricks/FluentStorage/blob/develop/FluentStorage.AWS/Blobs/AwsS3BlobStorage.cs#L195

Here the response.ResponseStream is wrapped in a FixedStream, which is returned to the user. But the FixedStream does not dispose the stream that is given to it.

I'm not sure if this is intentional for a reason that I don't understand, or, if it is a bug, whether the appropriate fix would be to have FixedStream dispose the stream it is passed, or have AwsS3BlobStorage pass a disposeCallback to the FixedStream constructor.

timothycoleman avatar Nov 20 '24 12:11 timothycoleman