Commit 6a6907f
committed
Fix memory leak in the timer
We were creating two futures, but only awaiting until the one of them
finished and not canceling the second.
Because `reset()` was never called, we were just creating more and
more futures that would never complete.
This change fixes this by canceling the second task immediately after
the first one is complete.
Signed-off-by: Sahas Subramanian <[email protected]>1 parent 5ab1279 commit 6a6907f
1 file changed
+13
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
692 | 691 | | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
693 | 699 | | |
694 | 700 | | |
695 | 701 | | |
| |||
0 commit comments