1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00

use default router

This commit is contained in:
Asim Aslam 2019-01-14 21:45:43 +00:00
parent c1d0237370
commit e362466e8a

View File

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