mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
Disable VMess drain when not pure connection
This commit is contained in:
parent
ff9bb2d8df
commit
f390047b37
3 changed files with 16 additions and 7 deletions
|
@ -220,9 +220,18 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i
|
|||
return newError("unable to set read deadline").Base(err).AtWarning()
|
||||
}
|
||||
|
||||
iConn := connection
|
||||
if statConn, ok := iConn.(*internet.StatCouterConnection); ok {
|
||||
iConn = statConn.Connection
|
||||
}
|
||||
_, isDrain := iConn.(*net.TCPConn)
|
||||
if !isDrain {
|
||||
_, isDrain = iConn.(*net.UnixConn)
|
||||
}
|
||||
|
||||
reader := &buf.BufferedReader{Reader: buf.NewReader(connection)}
|
||||
svrSession := encoding.NewServerSession(h.clients, h.sessionHistory)
|
||||
request, err := svrSession.DecodeRequestHeader(reader)
|
||||
request, err := svrSession.DecodeRequestHeader(reader, isDrain)
|
||||
if err != nil {
|
||||
if errors.Cause(err) != io.EOF {
|
||||
log.Record(&log.AccessMessage{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue