Skip to content

Commit

Permalink
fix: back source weight (#762)
Browse files Browse the repository at this point in the history
* fix: back source weight

Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi committed Oct 27, 2021
1 parent 6db54d8 commit aaf769e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scheduler/supervisor/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ func (task *Task) AddBackToSourcePeer(peerID string) {
return
}

if task.BackToSourceWeight.Load() <= 0 {
return
}

task.lock.Lock()
defer task.lock.Unlock()

Expand Down

0 comments on commit aaf769e

Please sign in to comment.