From 3356b83f2499ddad5592c51434035652aadaff16 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Sun, 1 Dec 2019 21:04:09 +0000 Subject: [PATCH] register debug handler --- util/mux/mux.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util/mux/mux.go b/util/mux/mux.go index 741dafcd..ecc3c680 100644 --- a/util/mux/mux.go +++ b/util/mux/mux.go @@ -5,6 +5,7 @@ import ( "context" "sync" + proto "github.com/micro/go-micro/debug/proto" "github.com/micro/go-micro/debug/handler" "github.com/micro/go-micro/proxy" "github.com/micro/go-micro/server" @@ -39,11 +40,10 @@ func (s *Server) ServeRequest(ctx context.Context, req server.Request, rsp serve func New(name string, p proxy.Proxy) *Server { // only register this once once.Do(func() { - server.DefaultRouter.Handle( - server.DefaultRouter.NewHandler( - handler.DefaultHandler, - server.InternalHandler(true), - ), + proto.RegisterDebugHandler( + server.DefaultServer, + handler.DefaultHandler, + server.InternalHandler(true), ) })