workflow: drop the dead abandon-timer guard in drive()'s finally
The per-file branch gate caught it: drive()'s finally always cancels first, and every first cancel() arms the abandon timer, so the `!== undefined` guard's false arm was unreachable. clearTimeout tolerates undefined by contract — call it unguarded.
This commit is contained in:
@@ -265,8 +265,9 @@ export class WorkflowExecution {
|
||||
// their rejections from going unhandled.)
|
||||
if (this.cancelReason === undefined) this.cancel('workflow settled')
|
||||
// drive() settling means nothing is left to abandon — including the
|
||||
// timer the self-cancel above just armed.
|
||||
if (this.abandonTimer !== undefined) clearTimeout(this.abandonTimer)
|
||||
// timer the self-cancel above just armed (cancel() always arms it, so
|
||||
// it is never undefined here; clearTimeout tolerates undefined anyway).
|
||||
clearTimeout(this.abandonTimer)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user