1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-21 19:59:08 -04:00

update activity

This commit is contained in:
Darien Raymond
2017-04-27 22:30:48 +02:00
parent f418b9bc20
commit 6f3362fc4c
11 changed files with 39 additions and 33 deletions

View File

@@ -118,7 +118,7 @@ func (v *Handler) Process(ctx context.Context, outboundRay ray.OutboundRay, dial
} else {
writer = buf.NewSequentialWriter(conn)
}
if err := buf.Copy(timer, input, writer); err != nil {
if err := buf.Copy(input, writer, buf.UpdateActivity(timer)); err != nil {
return newError("failed to process request").Base(err)
}
return nil
@@ -128,7 +128,7 @@ func (v *Handler) Process(ctx context.Context, outboundRay ray.OutboundRay, dial
defer output.Close()
v2reader := buf.NewReader(conn)
if err := buf.Copy(timer, v2reader, output); err != nil {
if err := buf.Copy(v2reader, output, buf.UpdateActivity(timer)); err != nil {
return newError("failed to process response").Base(err)
}
return nil