Stop sending boot commands when context canceled.
This commit is contained in:
parent
9a839c401b
commit
add7e8acb9
|
@ -50,6 +50,9 @@ type expressionSequence []expression
|
||||||
// Do executes every expression in the sequence and then finalizes the driver.
|
// Do executes every expression in the sequence and then finalizes the driver.
|
||||||
func (s expressionSequence) Do(ctx context.Context, b BCDriver) error {
|
func (s expressionSequence) Do(ctx context.Context, b BCDriver) error {
|
||||||
for _, exp := range s {
|
for _, exp := range s {
|
||||||
|
if err := ctx.Err(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if err := exp.Do(ctx, b); err != nil {
|
if err := exp.Do(ctx, b); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue