1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-11-02 21:37:10 -05:00

aggressively close connection when response is done

This commit is contained in:
Darien Raymond
2017-09-27 15:29:00 +02:00
parent 2ce1d8ffa2
commit 109a37fe7e
8 changed files with 59 additions and 12 deletions

View File

@@ -94,6 +94,9 @@ func (d *DokodemoDoor) Process(ctx context.Context, network net.Network, conn in
if err := buf.Copy(inboundRay.InboundOutput(), writer, buf.UpdateActivity(timer)); err != nil {
return newError("failed to transport response").Base(err)
}
timer.SetTimeout(time.Second * 2)
return nil
})