Skip to content

Commit 7936814

Browse files
authored
throw EndOfStreamException get null from api server (#835)
1 parent abebb2c commit 7936814

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/KubernetesClient/LineSeparatedHttpContent.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ public override Task<string> ReadLineAsync()
175175
public async Task<string> PeekLineAsync()
176176
{
177177
var line = await ReadLineAsync().ConfigureAwait(false);
178+
if (line == null)
179+
{
180+
throw new EndOfStreamException();
181+
}
182+
178183
_buffer.Enqueue(line);
179184
return line;
180185
}

0 commit comments

Comments
 (0)