mirror of
https://github.com/smallnest/rpcx.git
synced 2025-09-26 20:21:14 +08:00
#829 prior to use service error
This commit is contained in:
@@ -315,7 +315,7 @@ func (p *pluginContainer) DoPreCall(ctx context.Context, serviceName, methodName
|
||||
|
||||
// DoPostCall invokes PostCallPlugin plugin.
|
||||
func (p *pluginContainer) DoPostCall(ctx context.Context, serviceName, methodName string, args, reply interface{}, err error) (interface{}, error) {
|
||||
e := err
|
||||
var e error
|
||||
for i := range p.plugins {
|
||||
if plugin, ok := p.plugins[i].(PostCallPlugin); ok {
|
||||
reply, e = plugin.PostCall(ctx, serviceName, methodName, args, reply, err)
|
||||
|
@@ -825,7 +825,10 @@ func (s *Server) handleRequestForFunction(ctx context.Context, req *protocol.Mes
|
||||
err = service.callForFunction(ctx, mtype, reflect.ValueOf(argv), reflect.ValueOf(replyv))
|
||||
}
|
||||
|
||||
replyv, err = s.Plugins.DoPostCall(ctx, serviceName, methodName, argv, replyv, err)
|
||||
replyv, err1 := s.Plugins.DoPostCall(ctx, serviceName, methodName, argv, replyv, err)
|
||||
if err == nil {
|
||||
err = err1
|
||||
}
|
||||
|
||||
reflectTypePools.Put(mtype.ArgType, argv)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user