Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensuring NIOAsyncChannel flushes all writes before closing #3049

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Remove flush from executeThenClose error handling
adam-fowler committed Jan 13, 2025
commit 294098df7253873d6de2bc7bea06c94ff8731b38
1 change: 0 additions & 1 deletion Sources/NIOCore/AsyncChannel/AsyncChannel.swift
Original file line number Diff line number Diff line change
@@ -293,7 +293,6 @@ public struct NIOAsyncChannel<Inbound: Sendable, Outbound: Sendable>: Sendable {
result = try await body(self._inbound, self._outbound)
} catch let bodyError {
do {
try await self._outbound.flush()
self._outbound.finish()
try await self.channel.close().get()
throw bodyError