Commit 1b04239
authored
Remove dead continuedAsNew code after do-while loop (#1304)
The do-while loop in OnProcessWorkItemAsync exits only when continuedAsNew
is false. This means all references to continuedAsNew and continuedAsNewMessage
after the loop are dead code:
- The ternary checks 'continuedAsNew ? null : messagesToSend' always evaluate
to messagesToSend (same for timerMessages).
- continuedAsNewMessage is always null (only set when continuedAsNew is true,
which causes the loop to continue).
- 'continuedAsNew' in the return statement is always false.
This change:
- Narrows the scope of continuedAsNew to just around the do-while loop
- Moves continuedAsNewMessage declaration inside the loop body
- Simplifies the CompleteTaskOrchestrationWorkItemAsync call arguments
- Removes continuedAsNew from the return expression1 parent 7c4e018 commit 1b04239
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | 321 | | |
323 | 322 | | |
324 | 323 | | |
325 | 324 | | |
326 | 325 | | |
327 | 326 | | |
328 | 327 | | |
329 | | - | |
330 | 328 | | |
331 | 329 | | |
332 | 330 | | |
| |||
389 | 387 | | |
390 | 388 | | |
391 | 389 | | |
| 390 | + | |
392 | 391 | | |
393 | 392 | | |
394 | 393 | | |
395 | | - | |
| 394 | + | |
396 | 395 | | |
397 | 396 | | |
398 | 397 | | |
| |||
707 | 706 | | |
708 | 707 | | |
709 | 708 | | |
710 | | - | |
| 709 | + | |
711 | 710 | | |
712 | | - | |
713 | | - | |
| 711 | + | |
| 712 | + | |
714 | 713 | | |
715 | 714 | | |
716 | 715 | | |
717 | 716 | | |
718 | 717 | | |
719 | 718 | | |
720 | 719 | | |
721 | | - | |
| 720 | + | |
722 | 721 | | |
723 | 722 | | |
724 | 723 | | |
| |||
0 commit comments