SetBGPPeerCount stored a count only when it was above 0, so when the last peer the streamer knew of went down, bgp_peer_count kept its old value. It now stores every count from 0 up. Model: opus-5-5
This commit was merged in pull request #93.
This commit is contained in:
@@ -168,7 +168,7 @@ func (t *Tracker) RecordWithdrawal() {
|
||||
// SetBGPPeerCount updates the current BGP peer count
|
||||
func (t *Tracker) SetBGPPeerCount(count int) {
|
||||
// BGP peer count is always small (< 1000), so int32 is safe
|
||||
if count > 0 && count < 1<<31 {
|
||||
if count >= 0 && count < 1<<31 {
|
||||
t.bgpPeerCount.Store(int32(count))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user