diff --git a/hystrix/eventstream.go b/hystrix/eventstream.go index afe2d85..7ac8872 100644 --- a/hystrix/eventstream.go +++ b/hystrix/eventstream.go @@ -50,7 +50,7 @@ func (sh *StreamHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { events := sh.register(req) defer sh.unregister(req) - notify := rw.(http.CloseNotifier).CloseNotify() + notify := req.Context().Done() rw.Header().Add("Content-Type", "text/event-stream") rw.Header().Set("Cache-Control", "no-cache") diff --git a/loadtest/service/main.go b/loadtest/service/main.go index 7c487c9..e4caab8 100644 --- a/loadtest/service/main.go +++ b/loadtest/service/main.go @@ -53,7 +53,7 @@ func main() { if err != nil { log.Fatalf("could not initialize statsd client: %v", err) } - metricCollector.Registry.Register(c.NewStatsdCollector) + metric.Registry.Register(c.NewStatsdCollector) hystrix.ConfigureCommand("test", hystrix.CommandConfig{ Timeout: 50,