Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"log/slog"
"net/http"
"sync"
"syscall"
"time"

"github.com/roadrunner-server/http/v6/api"
Expand Down Expand Up @@ -211,7 +212,11 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}

// we should not exit from the loop here, since after sending close signal, it should be closed from the SDK side
h.log.Error("write response (chunk) error",
level := slog.LevelError
if stderr.Is(err, syscall.EPIPE) {
level = slog.LevelWarn
}
h.log.Log(r.Context(), level, "write response (chunk) error",
"start", start,
"elapsed", time.Since(start).Milliseconds(),
"error", err)
Expand Down
Loading