mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to v0.11.0-rc4
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:

committed by
Tonis Tiigi

parent
ff6754eb04
commit
60c9cf74ce
5
vendor/github.com/moby/buildkit/session/sshforward/copy.go
generated
vendored
5
vendor/github.com/moby/buildkit/session/sshforward/copy.go
generated
vendored
@ -14,16 +14,19 @@ type Stream interface {
|
||||
}
|
||||
|
||||
func Copy(ctx context.Context, conn io.ReadWriteCloser, stream Stream, closeStream func() error) error {
|
||||
defer conn.Close()
|
||||
g, ctx := errgroup.WithContext(ctx)
|
||||
|
||||
g.Go(func() (retErr error) {
|
||||
p := &BytesMessage{}
|
||||
for {
|
||||
if err := stream.RecvMsg(p); err != nil {
|
||||
conn.Close()
|
||||
if err == io.EOF {
|
||||
// indicates client performed CloseSend, but they may still be
|
||||
// reading data, so don't close conn yet
|
||||
return nil
|
||||
}
|
||||
conn.Close()
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
select {
|
||||
|
Reference in New Issue
Block a user