improve function call

This commit is contained in:
smallnest
2020-05-16 14:30:43 +08:00
parent 9e5976a9d1
commit b01b68f586

View File

@@ -601,7 +601,11 @@ func (s *Server) handleRequestForFunction(ctx context.Context, req *protocol.Mes
replyv := argsReplyPools.Get(mtype.ReplyType)
if mtype.ArgType.Kind() != reflect.Ptr {
err = service.callForFunction(ctx, mtype, reflect.ValueOf(argv).Elem(), reflect.ValueOf(replyv))
} else {
err = service.callForFunction(ctx, mtype, reflect.ValueOf(argv), reflect.ValueOf(replyv))
}
argsReplyPools.Put(mtype.ArgType, argv)