Skip to content

Commit

Permalink
feat: add flushing capability to smartBodyCloser on close
Browse files Browse the repository at this point in the history
  • Loading branch information
simulot committed Mar 9, 2025
1 parent 6cd8a8f commit 87fb67e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions immich/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit 87fb67e

Please # to comment.