mirror of
https://github.com/smallnest/rpcx.git
synced 2025-10-19 06:24:32 +08:00
improve function call
This commit is contained in:
@@ -601,7 +601,11 @@ func (s *Server) handleRequestForFunction(ctx context.Context, req *protocol.Mes
|
|||||||
|
|
||||||
replyv := argsReplyPools.Get(mtype.ReplyType)
|
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))
|
err = service.callForFunction(ctx, mtype, reflect.ValueOf(argv), reflect.ValueOf(replyv))
|
||||||
|
}
|
||||||
|
|
||||||
argsReplyPools.Put(mtype.ArgType, argv)
|
argsReplyPools.Put(mtype.ArgType, argv)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user