summaryrefslogtreecommitdiff
path: root/plugins/rpc/plugin.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-13 16:29:08 +0300
committerValery Piashchynski <[email protected]>2020-11-13 16:29:08 +0300
commit6eefd067f4c08ed51834926abd1a4c60ec55b56d (patch)
tree5c4e3d3d930243f0c19083eff8bd5719ec266500 /plugins/rpc/plugin.go
parent002eb4bb1981558fa5e614aed22d322f0f45d7ea (diff)
Update tests
Diffstat (limited to 'plugins/rpc/plugin.go')
-rwxr-xr-xplugins/rpc/plugin.go11
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