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

@@ -1,5 +1,10 @@
# [rpcx](http://rpcx.site)
## 5.0 (developing)
- support opentracing and opencensus
- upload/download files by streaming
## 4.0
- Support utp and rudp

2
go.mod
View File

@@ -88,7 +88,7 @@ require (
github.com/xtaci/kcp-go v2.0.3+incompatible
go.opencensus.io v0.19.0
golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4 // indirect
golang.org/x/net v0.0.0-20181217023233-e147a9138326
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect

2
go.sum
View File

@@ -277,6 +277,8 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181217023233-e147a9138326 h1:iCzOf0xz39Tstp+Tu/WwyGjUXCk34QhQORRxBeXXTA4=
golang.org/x/net v0.0.0-20181217023233-e147a9138326/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3 h1:ulvT7fqt0yHWzpJwI57MezWnYDVpCAYBVuYst/L+fAY=
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=

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