1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-02 23:35:40 -05: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

@@ -141,7 +141,7 @@ func (s *Server) handleConnect(ctx context.Context, request *http.Request, reade
defer ray.InboundInput().Close()
v2reader := buf.NewReader(reader)
if err := buf.Copy(timer, v2reader, ray.InboundInput()); err != nil {
if err := buf.Copy(v2reader, ray.InboundInput(), buf.UpdateActivity(timer)); err != nil {
return err
}
return nil
@@ -149,7 +149,7 @@ func (s *Server) handleConnect(ctx context.Context, request *http.Request, reade
responseDone := signal.ExecuteAsync(func() error {
v2writer := buf.NewWriter(writer)
if err := buf.Copy(timer, ray.InboundOutput(), v2writer); err != nil {
if err := buf.Copy(ray.InboundOutput(), v2writer, buf.UpdateActivity(timer)); err != nil {
return err
}
return nil