Skip to content

Commit f38c364

Browse files
committed
refactor(resource_monitor): simplify stop timer handling during resource acquisition
1 parent 28df064 commit f38c364

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

flow/resource_monitor.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,7 @@ func (r *monitorRegistry) Acquire(
290290

291291
// Cancel pending stop if we are resurrecting within the grace period
292292
if r.stopTimer != nil {
293-
if !r.stopTimer.Stop() {
294-
<-r.stopTimer.C
295-
}
293+
_ = r.stopTimer.Stop()
296294
r.stopTimer = nil
297295
}
298296

0 commit comments

Comments
 (0)