diff --git a/client/client.go b/client/client.go index 56fe72d..74a18f2 100644 --- a/client/client.go +++ b/client/client.go @@ -399,6 +399,14 @@ func (c *client) handleNotification(resCodec protocol.ClientResponseCodec) error return err } + if nil == c.ch.GetRPCRegistry() { + params, err := notiCodec.Params() + if nil != err { + return err + } + return fmt.Errorf("Client: Get Notification[method: %s, params: %v]. But RPC registry is not specified", notiCodec.Method(), params) + } + _, err = c.ch.GetRPCRegistry().Invoke(notiCodec) return err diff --git a/client/client_handlers.go b/client/client_handlers.go index 071a8db..bfcc73d 100644 --- a/client/client_handlers.go +++ b/client/client_handlers.go @@ -73,9 +73,6 @@ func (ch *ClientHandlers) Validate() { if nil == ch.Codec { logging.Logger().Panic("RPC Client Handler: Codec must be specified") } - if nil == ch.RPCRegistry { - logging.Logger().Panic("RPC Client Handler: RPCRegistry must be specified") - } if ch.RequestTimeout <= 0 { ch.RequestTimeout = DefaultRequestTimeout