mirror of
https://github.com/smallnest/rpcx.git
synced 2025-12-24 12:27:56 +08:00
#825 fix clients have not received server errors
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,3 +6,5 @@ vendor/
|
||||
.idea
|
||||
|
||||
cover.html
|
||||
|
||||
.history
|
||||
@@ -722,7 +722,10 @@ func (s *Server) handleRequest(ctx context.Context, req *protocol.Message) (res
|
||||
err = service.call(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
|
||||
}
|
||||
|
||||
// return argc to object pool
|
||||
reflectTypePools.Put(mtype.ArgType, argv)
|
||||
@@ -809,7 +812,6 @@ func (s *Server) handleRequestForFunction(ctx context.Context, req *protocol.Mes
|
||||
replyv, err = s.Plugins.DoPostCall(ctx, serviceName, methodName, argv, replyv, err)
|
||||
|
||||
reflectTypePools.Put(mtype.ArgType, argv)
|
||||
|
||||
if err != nil {
|
||||
reflectTypePools.Put(mtype.ReplyType, replyv)
|
||||
return s.handleError(res, err)
|
||||
|
||||
Reference in New Issue
Block a user