Skip to content

Commit e27e800

Browse files
committed
Adding keepalive format options (#46)
1 parent b479a54 commit e27e800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Test.AspNetCore.ServerSentEvents/Functional/KeepaliveTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private static async Task<string> GetServerSentEvents(HttpClient serverSentEvent
173173
int bytesRead = await responseStream.ReadAsync(buffer, 0, buffer.Length, keepaliveCancellationTokenSource.Token).ConfigureAwait(false);
174174
serverSentEventsResponseContent += Encoding.UTF8.GetString(buffer, 0, bytesRead);
175175
}
176-
catch (OperationCanceledException)
176+
catch (Exception ex) when (ex is OperationCanceledException || ex.InnerException is OperationCanceledException)
177177
{ }
178178

179179
ArrayPool<byte>.Shared.Return(buffer);

0 commit comments

Comments
 (0)