Skip to content

Commit

Permalink
fix: race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Oct 22, 2024
1 parent 339c41f commit 6bc41a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/api/common/middlewares_timeout.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func (r *responseWriter) Write(bytes []byte) (int, error) {
case <-r.contextWithTimeout.Done():
return 0, nil
default:
r.headerWritten = true
return r.ResponseWriter.Write(bytes)
}
}
Expand Down

0 comments on commit 6bc41a4

Please sign in to comment.