Skip to content

Commit 2a6f7d9

Browse files
committed
fix(session): prevent duplicate execution with external scheduler factory
1 parent 365f6f9 commit 2a6f7d9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

session/session.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,8 @@ func (s *Session) Execute(task func(), executorFactory ...func() schedulerapi.Ex
461461
continue
462462
}
463463
executor = fac()
464-
if executor == nil {
465-
continue
466-
}
467-
if !executor.Execute(task) {
468-
continue
464+
if executor != nil && executor.Execute(task) {
465+
return
469466
}
470467
}
471468
// 全局级别执行器

0 commit comments

Comments
 (0)