Skip to content

Commit

Permalink
Merge pull request #2995 from coryb/fix-shared-session
Browse files Browse the repository at this point in the history
do not close sessions after client solve if pre-initialized
  • Loading branch information
tonistiigi authored Aug 2, 2022
2 parents 28817fc + 5674c2d commit 6805940
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/solve.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,10 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG
<-time.After(3 * time.Second)
cancelStatus()
}()
bklog.G(ctx).Debugf("stopping session")
s.Close()
if !opt.SessionPreInitialized {
bklog.G(ctx).Debugf("stopping session")
s.Close()
}
}()
var pbd *pb.Definition
if def != nil {
Expand Down

0 comments on commit 6805940

Please sign in to comment.