diff options
author | Valery Piashchynski <[email protected]> | 2020-11-13 16:29:08 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-13 16:29:08 +0300 |
commit | 6eefd067f4c08ed51834926abd1a4c60ec55b56d (patch) | |
tree | 5c4e3d3d930243f0c19083eff8bd5719ec266500 /plugins/rpc/plugin.go | |
parent | 002eb4bb1981558fa5e614aed22d322f0f45d7ea (diff) |
Update tests
Diffstat (limited to 'plugins/rpc/plugin.go')
-rwxr-xr-x | plugins/rpc/plugin.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/plugins/rpc/plugin.go b/plugins/rpc/plugin.go index d7f91742..82b30563 100755 --- a/plugins/rpc/plugin.go +++ b/plugins/rpc/plugin.go @@ -67,13 +67,7 @@ func (s *Plugin) Serve() chan error { // Attach all services for i := 0; i < len(s.services); i++ { - svc, err := s.services[i].service.RPC() - if err != nil { - errCh <- errors.E(op, err) - return errCh - } - - err = s.Register(s.services[i].name, svc) + err := s.Register(s.services[i].name, s.services[i].service.RPC()) if err != nil { errCh <- errors.E(op, err) return errCh @@ -137,12 +131,11 @@ func (s *Plugin) Collects() []interface{} { } // RegisterPlugin registers RPC service plugin. -func (s *Plugin) RegisterPlugin(name endure.Named, p rpc_.RPCer) error { +func (s *Plugin) RegisterPlugin(name endure.Named, p rpc_.RPCer) { s.services = append(s.services, pluggable{ service: p, name: name.Name(), }) - return nil } // Register publishes in the server the set of methods of the |