Only emit event if Update actually happens
This commit is contained in:
parent
b457ec1990
commit
f50bd400f8
@ -105,8 +105,10 @@ func (t *table) Update(r Route) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _, ok := t.routes[service][sum]; !ok {
|
||||||
t.routes[service][sum] = r
|
t.routes[service][sum] = r
|
||||||
go t.sendEvent(&Event{Type: Update, Timestamp: time.Now(), Route: r})
|
go t.sendEvent(&Event{Type: Update, Timestamp: time.Now(), Route: r})
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user