瀏覽代碼

Merge pull request #35404 from tonistiigi/stream-ctx-fix

builder: fix long stream sync
Sebastiaan van Stijn 7 年之前
父節點
當前提交
2c1043c913
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      builder/dockerfile/builder.go

+ 2 - 2
builder/dockerfile/builder.go

@@ -131,10 +131,10 @@ func (bm *BuildManager) initializeClientSession(ctx context.Context, cancel func
 	}
 	}
 	logrus.Debug("client is session enabled")
 	logrus.Debug("client is session enabled")
 
 
-	ctx, cancelCtx := context.WithTimeout(ctx, sessionConnectTimeout)
+	connectCtx, cancelCtx := context.WithTimeout(ctx, sessionConnectTimeout)
 	defer cancelCtx()
 	defer cancelCtx()
 
 
-	c, err := bm.sg.Get(ctx, options.SessionID)
+	c, err := bm.sg.Get(connectCtx, options.SessionID)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
 	}
 	}