We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d584d9c commit f9128faCopy full SHA for f9128fa
1 file changed
EventSource4Net/ConnectedState.cs
@@ -47,7 +47,7 @@ public Task<IConnectionState> Run(Action<ServerSentEvent> msgReceived, Cancellat
47
{
48
_logger.Trace(ex, "ConnectedState.Run");
49
}
50
- if (!cancelToken.IsCancellationRequested)
+ if (!cancelToken.IsCancellationRequested && !taskRead.IsFaulted)
51
52
int bytesRead = taskRead.Result;
53
if (bytesRead > 0) // stream has not reached the end yet
0 commit comments