Only support single signature for subscriber and validate

This commit is contained in:
Asim
2015-12-02 17:42:14 +00:00
parent b1511ed813
commit cfa676af19
4 changed files with 74 additions and 5 deletions

View File

@@ -132,6 +132,10 @@ func (s *rpcServer) Subscribe(sb Subscriber) error {
return fmt.Errorf("invalid subscriber: no handler functions")
}
if err := validateSubscriber(sb); err != nil {
return err
}
s.Lock()
_, ok = s.subscribers[sub]
if ok {