Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Replaced lock for reading with lock for writing (RLock/RUnlock -> Loc…
Browse files Browse the repository at this point in the history
…k/Unlock) in (p *pool) IncRestartCount
  • Loading branch information
katarzyna-z committed Feb 17, 2017
1 parent 448e2ce commit ac9e9bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions control/strategy/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ func (p *pool) RestartCount() int {
}

func (p *pool) IncRestartCount() {
p.RLock()
defer p.RUnlock()
p.Lock()
defer p.Unlock()
p.restartCount++
}

Expand Down

0 comments on commit ac9e9bf

Please sign in to comment.