Skip to content

Commit

Permalink
stat response writer should support Flusher interface (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinner-lyft authored Aug 6, 2017
1 parent 04fc2f0 commit 1a658ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions stat_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ func (h *statResponseWriter) WriteHeader(code int) {
h.handler.scope.NewCounter(strconv.Itoa(code)).Inc()
h.delegate.WriteHeader(code)
}

func (h *statResponseWriter) Flush() {
if flusher, ok := h.delegate.(http.Flusher); ok {
flusher.Flush()
}
}

0 comments on commit 1a658ed

Please sign in to comment.