fix: panic with metrics recorder.

This commit is contained in:
Ludovic Fernandez 2019-09-30 14:42:04 +02:00 committed by Traefiker Bot
parent 211fa18ac2
commit 33a1499bdd

View file

@ -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()
}
}