Cancel the context timeout AFTER errors are checked
This commit is contained in:
parent
6d8686138a
commit
548995e935
1 changed files with 1 additions and 1 deletions
|
@ -249,8 +249,8 @@ func (e *executor) operate(ctx context.Context, stm sql.Statement) (res []interf
|
|||
if tim := ctx.Err(); err == nil && tim != nil {
|
||||
res, err = nil, &TimerError{timer: stm.Duration()}
|
||||
}
|
||||
canc()
|
||||
}()
|
||||
defer canc()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue