From 13d2a9ec7a4b620606333079d4aba06578c91f6e Mon Sep 17 00:00:00 2001 From: Milos Gajdos Date: Thu, 28 Nov 2019 11:55:49 +0000 Subject: [PATCH] Register proto handler properly --- service.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/service.go b/service.go index 3058a3b2..e0c53a98 100644 --- a/service.go +++ b/service.go @@ -16,6 +16,8 @@ import ( "github.com/micro/go-micro/server" "github.com/micro/go-micro/util/log" "github.com/micro/go-micro/util/wrapper" + + pb "github.com/micro/go-micro/debug/proto" ) type service struct { @@ -141,12 +143,9 @@ func (s *service) Stop() error { func (s *service) Run() error { // register the debug handler - s.opts.Server.Handle( - s.opts.Server.NewHandler( - handler.DefaultHandler, - server.InternalHandler(true), - ), - ) + pb.RegisterDebugHandler(s.opts.Server, + handler.DefaultHandler, + server.InternalHandler(true)) // start the profiler // TODO: set as an option to the service, don't just use pprof