paulirwin commented on code in PR #1170: URL: https://github.com/apache/lucenenet/pull/1170#discussion_r2300917256
########## src/dotnet/Lucene.Net.Replicator.AspNetCore/AspNetCoreReplicationResponse.cs: ########## @@ -68,5 +70,21 @@ public void Flush() { response.Body.Flush(); } + + /// <summary> + /// Flushes the response to the underlying response stream asynchronously. + /// </summary> + /// <param name="cancellationToken">Optional cancellation token.</param> + /// <returns>A task representing the asynchronous operation.</returns> + /// <remarks> + /// This simply calls <see cref="Stream.FlushAsync(CancellationToken)"/> on the <see cref="HttpResponse.Body"/>. + /// </remarks> + public async Task FlushAsync(CancellationToken cancellationToken = default) + { + if (response.Body.CanWrite) Review Comment: Thanks for the breakdown. My vote would be to remove the check. If you're calling Flush and it quietly seems like it's succeeding when it actually isn't, that might be unintentionally covering up some bugs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org