From de7d112428286c01ecc3df1ef2496786ced01c67 Mon Sep 17 00:00:00 2001 From: crusader Date: Thu, 30 Nov 2017 14:55:48 +0900 Subject: [PATCH] ing --- client/client.go | 8 ++++++++ client/client_handlers.go | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) 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