Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

CanRead does not really reflect if the Blob can be read after disposing #1049

Open
Algo-ryth-mix opened this issue Sep 17, 2021 · 0 comments

Comments

@Algo-ryth-mix
Copy link

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the SDK was used?

4.0.3 (seems to be present in 4.0.4)

Which platform are you using? (ex: .NET Core 2.1)

.NETStandard 2.0

What problem was encountered?

BlobReadStreamBase reports that it can be read from, even after the internalBuffer has been disposed of

How can we reproduce the problem in the simplest way?

  • Create a [Blob] Stream
  • Dispose it
  • check the value of CanRead

Have you found a mitigation/solution?

Obviously Not disposing it is a good solution here to make it actually work, but it would be nice if "CanRead" and "CanSeek" would reflect the internal invalidness something like this:

public override bool CanRead
{
    get
    {
        return this.internalBuffer != null;
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant