mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-30 05:56:54 -05:00
reduce delay on passive connections
This commit is contained in:
parent
d828aa2fba
commit
4e30ac33d0
@ -147,7 +147,7 @@ func (m *Client) monitor() {
|
||||
}
|
||||
|
||||
func writeFirstPayload(reader buf.Reader, writer *Writer) error {
|
||||
err := buf.CopyOnceTimeout(reader, writer, time.Millisecond*200)
|
||||
err := buf.CopyOnceTimeout(reader, writer, time.Millisecond*100)
|
||||
if err == buf.ErrNotTimeoutReader || err == buf.ErrReadTimeout {
|
||||
return writer.WriteMultiBuffer(buf.MultiBuffer{})
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ func (v *Handler) Process(ctx context.Context, link *core.Link, dialer proxy.Dia
|
||||
}
|
||||
|
||||
bodyWriter := session.EncodeRequestBody(request, writer)
|
||||
if err := buf.CopyOnceTimeout(input, bodyWriter, time.Millisecond*500); err != nil && err != buf.ErrNotTimeoutReader && err != buf.ErrReadTimeout {
|
||||
if err := buf.CopyOnceTimeout(input, bodyWriter, time.Millisecond*100); err != nil && err != buf.ErrNotTimeoutReader && err != buf.ErrReadTimeout {
|
||||
return newError("failed to write first payload").Base(err)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user