fixed healthcheck failed to disable and nil dereference

This commit is contained in:
yusing
2024-10-19 00:13:55 +08:00
parent 53557e38b6
commit b296fb2965
11 changed files with 60 additions and 20 deletions

View File

@@ -160,7 +160,11 @@ func (t *task) Context() context.Context {
}
func (t *task) FinishCause() error {
return context.Cause(t.ctx)
cause := context.Cause(t.ctx)
if cause == nil {
return t.ctx.Err()
}
return cause
}
func (t *task) Parent() Task {