Skip to content

Commit

Permalink
Fix some lint errors - try 1
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandezBenjamin committed Sep 8, 2023
1 parent 9d5ea0e commit 415159f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ func newServer(ctx context.Context, c Config, rotationStrategy rotationStrategy)
// Buffer size middleware
bufferSizeMidldleware := func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w := bufio.NewWriterSize(w, 4096*2)
if w.Buffered() > 0{
w.Flush()
pw := bufio.NewWriterSize(w, 4096*2)
if pw.Buffered() > 0{
pw.Flush()
}
next.ServeHTTP(w, r)
})
Expand Down

0 comments on commit 415159f

Please sign in to comment.