fix DeepSource and CHANGELOG.md

This commit is contained in:
guoxingyong
2021-05-26 13:37:09 +08:00
parent 7419ad952d
commit 003434cad6
2 changed files with 2 additions and 2 deletions

View File

@@ -557,9 +557,9 @@ func (m *taskManager) runNextTasks(sortList *MapSorter, effective time.Time) {
// check if timeout is on, if yes passing the timeout context
ctx := context.Background()
m.wait.Add(1)
if duration := e.GetTimeout(ctx); duration != 0 {
go func(e Tasker) {
m.wait.Add(1)
defer m.wait.Done()
ctx, cancelFunc := context.WithTimeout(ctx, duration)
defer cancelFunc()
@@ -570,7 +570,6 @@ func (m *taskManager) runNextTasks(sortList *MapSorter, effective time.Time) {
}(e)
} else {
go func(e Tasker) {
m.wait.Add(1)
defer m.wait.Done()
err := e.Run(ctx)
if err != nil {