avoid to invoke plugins if the connection is closed

This commit is contained in:
smallnest
2019-01-31 11:11:30 +08:00
parent 1444be51d9
commit 08a6536706
4 changed files with 11 additions and 1 deletions

View File

@@ -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