builder: fix long stream sync
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
diff --git a/builder/dockerfile/builder.go b/builder/dockerfile/builder.go
index 2b7b438..b62d6fc 100644
--- a/builder/dockerfile/builder.go
+++ b/builder/dockerfile/builder.go
@@ -131,10 +131,10 @@
}
logrus.Debug("client is session enabled")
- ctx, cancelCtx := context.WithTimeout(ctx, sessionConnectTimeout)
+ connectCtx, cancelCtx := context.WithTimeout(ctx, sessionConnectTimeout)
defer cancelCtx()
- c, err := bm.sg.Get(ctx, options.SessionID)
+ c, err := bm.sg.Get(connectCtx, options.SessionID)
if err != nil {
return nil, err
}