mirror of
https://github.com/smallnest/rpcx.git
synced 2025-10-18 22:14:39 +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)
|
||||
|
||||
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)
|
||||
|
||||
|
Reference in New Issue
Block a user