From 87fb67e2c15c550f59f6821fdc4617246bae1022 Mon Sep 17 00:00:00 2001 From: simulot Date: Sun, 9 Mar 2025 09:10:52 +0100 Subject: [PATCH] feat: add flushing capability to smartBodyCloser on close --- immich/trace.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/immich/trace.go b/immich/trace.go index 22024a18..e0d297b5 100644 --- a/immich/trace.go +++ b/immich/trace.go @@ -69,6 +69,9 @@ type smartBodyCloser struct { func (sb *smartBodyCloser) Close() error { fmt.Fprint(sb.w, "-- body end --\n\n") + if flusher, ok := sb.w.(interface{ Flush() error }); ok { + flusher.Flush() + } return sb.body.Close() }