File tree Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -620,27 +620,20 @@ impl BlockedTaskQueue {
620
620
621
621
// Shall the task automatically be woken up after a certain time?
622
622
if let Some ( wt) = wakeup_time {
623
- let first_task = true ;
624
623
let mut cursor = self . list . cursor_front_mut ( ) ;
625
- let _guard = scopeguard:: guard ( first_task, |first_task| {
626
- // If the task is the new first task in the list, update the one-shot timer
627
- // to fire when this task shall be woken up.
624
+ let _guard = scopeguard:: guard ( ( ) , |_| {
628
625
#[ cfg( not( feature = "tcp" ) ) ]
629
- if first_task {
630
- arch:: set_oneshot_timer ( wakeup_time) ;
631
- }
626
+ arch:: set_oneshot_timer ( wakeup_time) ;
632
627
#[ cfg( feature = "tcp" ) ]
633
- if first_task {
634
- match self . network_wakeup_time {
635
- Some ( time) => {
636
- if time > wt {
637
- arch:: set_oneshot_timer ( wakeup_time) ;
638
- } else {
639
- arch:: set_oneshot_timer ( self . network_wakeup_time ) ;
640
- }
628
+ match self . network_wakeup_time {
629
+ Some ( time) => {
630
+ if time > wt {
631
+ arch:: set_oneshot_timer ( wakeup_time) ;
632
+ } else {
633
+ arch:: set_oneshot_timer ( self . network_wakeup_time ) ;
641
634
}
642
- _ => arch:: set_oneshot_timer ( wakeup_time) ,
643
635
}
636
+ _ => arch:: set_oneshot_timer ( wakeup_time) ,
644
637
}
645
638
} ) ;
646
639
You can’t perform that action at this time.
0 commit comments