1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-27 12:35:21 -05:00

rename buf.Copy

This commit is contained in:
Darien Raymond
2017-04-17 22:50:02 +02:00
parent e362c74fa9
commit ab9349ec31
11 changed files with 29 additions and 30 deletions

View File

@@ -173,7 +173,7 @@ func (s *Server) handleConnection(ctx context.Context, conn internet.Connection,
return err
}
if err := buf.PipeUntilEOF(timer, ray.InboundOutput(), responseWriter); err != nil {
if err := buf.Copy(timer, ray.InboundOutput(), responseWriter); err != nil {
return newError("failed to transport all TCP response").Base(err)
}
@@ -183,7 +183,7 @@ func (s *Server) handleConnection(ctx context.Context, conn internet.Connection,
requestDone := signal.ExecuteAsync(func() error {
defer ray.InboundInput().Close()
if err := buf.PipeUntilEOF(timer, bodyReader, ray.InboundInput()); err != nil {
if err := buf.Copy(timer, bodyReader, ray.InboundInput()); err != nil {
return newError("failed to transport all TCP request").Base(err)
}
return nil