Skip to content

Commit

Permalink
fix: panic with metrics recorder.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored and traefiker committed Sep 30, 2019
1 parent 211fa18 commit 33a1499
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/middlewares/metrics/recorder.go
Expand Up @@ -33,5 +33,7 @@ func (r *responseRecorder) CloseNotify() <-chan bool {

// Flush sends any buffered data to the client.
func (r *responseRecorder) Flush() {
r.ResponseWriter.(http.Flusher).Flush()
if f, ok := r.ResponseWriter.(http.Flusher); ok {
f.Flush()
}
}

0 comments on commit 33a1499

Please sign in to comment.