Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

#625 Changes Error Message when trying to reuse stream #657

Merged
merged 1 commit into from
Jun 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public override int Read(byte[] buffer, int offset, int count)
PositionInnerStream();
if (!_innerStream.EnsureBuffered(_boundary.FinalBoundaryLength))
{
throw new IOException("Unexpected end of stream.");
throw new IOException("Unexpected end of Stream, the content may have already been read by another component. ");
}
var bufferedData = _innerStream.BufferedData;

Expand Down Expand Up @@ -280,7 +280,7 @@ public override async Task<int> ReadAsync(byte[] buffer, int offset, int count,
PositionInnerStream();
if (!await _innerStream.EnsureBufferedAsync(_boundary.FinalBoundaryLength, cancellationToken))
{
throw new IOException("Unexpected end of stream.");
throw new IOException("Unexpected end of Stream, the content may have already been read by another component. ");
}
var bufferedData = _innerStream.BufferedData;

Expand Down