mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-23 02:36:42 +00:00
fix push method
This commit is contained in:
@@ -28,13 +28,13 @@ func (b *UpdateBuffer) Push(update *UpdateMessage) {
|
|||||||
if b.update == nil || update.Update.NetworkMap.Serial > b.update.Update.NetworkMap.Serial || b.update.Update.NetworkMap.Serial == 0 {
|
if b.update == nil || update.Update.NetworkMap.Serial > b.update.Update.NetworkMap.Serial || b.update.Update.NetworkMap.Serial == 0 {
|
||||||
if b.update == nil {
|
if b.update == nil {
|
||||||
b.metrics.CountBufferPush()
|
b.metrics.CountBufferPush()
|
||||||
return
|
} else {
|
||||||
|
b.metrics.CountBufferOverwrite()
|
||||||
}
|
}
|
||||||
|
|
||||||
b.update = update
|
b.update = update
|
||||||
b.cond.Signal()
|
b.cond.Signal()
|
||||||
|
|
||||||
b.metrics.CountBufferOverwrite()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user