This repository was archived by the owner on Nov 20, 2018. It is now read-only.
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
ReferenceReadStream implementation doesn't properly implement Begin/End pattern #602
Closed
Description
The null ref described in this issue Azure/azure-storage-net#202 occurs because of a bug in the Azure sdk and a bug in http abstractions. ReferernceReadStream implements BeginRead using ReadAsync (https://github.com/aspnet/HttpAbstractions/blob/dev/src/Microsoft.AspNetCore.Http/Internal/ReferenceReadStream.cs#L128), the code in ReadAsync always calls the callback, even if ReadAsync completes synchronously. This can cause stackoverflows in calling code and bugs like the null reference one in the storage sdk.
/cc @Tratcher