From c6729cf9635440d02884e15065e4ed59bc74a9fa Mon Sep 17 00:00:00 2001 From: crusader Date: Thu, 2 Nov 2017 20:06:19 +0900 Subject: [PATCH] ing --- registry.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/registry.go b/registry.go index 4da4922..8f926b2 100644 --- a/registry.go +++ b/registry.go @@ -98,9 +98,13 @@ func (rr *rpcRegistry) Invoke(codec protocol.RegistryCodec) (result interface{}, if nil != methodSpec.returnType { result = returnValues[0].Interface() - err = returnValues[1].Interface().(error) + if nil != returnValues[1].Interface() { + err = returnValues[1].Interface().(error) + } } else { - err = returnValues[0].Interface().(error) + if nil != returnValues[0].Interface() { + err = returnValues[0].Interface().(error) + } } return