pprof does not need to inject middleware

This commit is contained in:
Miek Gieben 2016-04-29 22:04:22 +01:00
parent 9e9d72655d
commit 14b84ce02b
2 changed files with 3 additions and 18 deletions

View file

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

View file

@ -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 {