From e362466e8a0f60d777729ce656e474278d50dd2c Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Mon, 14 Jan 2019 21:45:43 +0000 Subject: [PATCH] use default router --- server/rpc_server.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/server/rpc_server.go b/server/rpc_server.go index d02e8421..eb4be8a5 100644 --- a/server/rpc_server.go +++ b/server/rpc_server.go @@ -38,7 +38,7 @@ func newRpcServer(opts ...Option) Server { options := newOptions(opts...) return &rpcServer{ opts: options, - router: newRpcRouter(), + router: DefaultRouter, handlers: make(map[string]Handler), subscribers: make(map[*subscriber][]broker.Subscriber), exit: make(chan chan error), @@ -188,12 +188,6 @@ func (s *rpcServer) Init(opts ...Option) error { for _, opt := range opts { opt(&s.opts) } - - // update router - r := newRpcRouter() - r.serviceMap = s.router.serviceMap - s.router = r - s.Unlock() return nil }