diff --git a/core/setup/pprof.go b/core/setup/pprof.go index cf6b49636..125d2a9ef 100644 --- a/core/setup/pprof.go +++ b/core/setup/pprof.go @@ -29,9 +29,5 @@ func PProf(c *Controller) (middleware.Middleware, error) { c.Startup = append(c.Startup, handler.Start) c.Shutdown = append(c.Shutdown, handler.Shutdown) }) - - return func(next middleware.Handler) middleware.Handler { - handler.Next = next - return handler - }, nil + return nil, nil } diff --git a/middleware/pprof/pprof.go b/middleware/pprof/pprof.go index 2c812f246..42102d198 100644 --- a/middleware/pprof/pprof.go +++ b/middleware/pprof/pprof.go @@ -5,22 +5,11 @@ import ( "net" "net/http" pp "net/http/pprof" - - "github.com/miekg/coredns/middleware" - - "github.com/miekg/dns" - "golang.org/x/net/context" ) type Handler struct { - Next middleware.Handler - ln net.Listener - mux *http.ServeMux -} - -// ServeDNS passes all other requests up the chain. -func (h *Handler) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - return h.Next.ServeDNS(ctx, w, r) + ln net.Listener + mux *http.ServeMux } func (h *Handler) Start() error {