Propagate cancellation and preserve resumable state
This commit is contained in:
@@ -149,6 +149,7 @@ func initializeSession(ctx context.Context, request *sessionInitializationInput,
|
||||
SessionID: sessionID,
|
||||
PreviousSessionID: previousSessionID,
|
||||
})
|
||||
err = errors.Join(err, ctx.Err())
|
||||
if err != nil {
|
||||
return report, fmt.Errorf("session init: %w", err)
|
||||
}
|
||||
@@ -164,6 +165,9 @@ func initializeSession(ctx context.Context, request *sessionInitializationInput,
|
||||
return report, fmt.Errorf("session init: render effective session: %w", err)
|
||||
}
|
||||
|
||||
if err := ctx.Err(); err != nil {
|
||||
return report, err
|
||||
}
|
||||
if !remote {
|
||||
if err := writeLocalFile(output, data, force); err != nil {
|
||||
return report, fmt.Errorf("session init: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user