mirror of
https://github.com/moby/buildkit.git
synced 2025-08-06 22:42:40 +03:00
replace WithTimeout with WithTimeoutCause
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@@ -141,8 +141,9 @@ func (ls *localSourceHandler) Snapshot(ctx context.Context, g session.Group) (ca
|
||||
return ls.snapshotWithAnySession(ctx, g)
|
||||
}
|
||||
|
||||
timeoutCtx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
||||
defer cancel()
|
||||
timeoutCtx, cancel := context.WithCancelCause(ctx)
|
||||
timeoutCtx, _ = context.WithTimeoutCause(timeoutCtx, 5*time.Second, errors.WithStack(context.DeadlineExceeded))
|
||||
defer cancel(errors.WithStack(context.Canceled))
|
||||
|
||||
caller, err := ls.sm.Get(timeoutCtx, sessionID, false)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user