Skip to content

Commit

Permalink
throw EndOfStreamException get null from api server (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiweiv authored Apr 20, 2022
1 parent abebb2c commit 7936814
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/KubernetesClient/LineSeparatedHttpContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ public override Task<string> ReadLineAsync()
public async Task<string> PeekLineAsync()
{
var line = await ReadLineAsync().ConfigureAwait(false);
if (line == null)
{
throw new EndOfStreamException();
}

_buffer.Enqueue(line);
return line;
}
Expand Down

0 comments on commit 7936814

Please sign in to comment.