mirror of
https://github.com/smallnest/rpcx.git
synced 2025-10-19 22:44:34 +08:00
avoid to invoke plugins if the connection is closed
This commit is contained in:
@@ -461,6 +461,9 @@ func (s *Server) readRequest(ctx context.Context, r io.Reader) (req *protocol.Me
|
||||
// pool req?
|
||||
req = protocol.GetPooledMsg()
|
||||
err = req.Decode(r)
|
||||
if err == io.EOF {
|
||||
return req, err
|
||||
}
|
||||
perr := s.Plugins.DoPostReadRequest(ctx, req, err)
|
||||
if err == nil {
|
||||
err = perr
|
||||
|
Reference in New Issue
Block a user