Small refactoring; Split horizon loop break.

This commit is contained in:
Milos Gajdos
2019-09-13 18:46:24 +01:00
parent d72e91fb38
commit 323a72be34
5 changed files with 93 additions and 70 deletions

View File

@@ -110,8 +110,12 @@ func (t *table) Update(r Route) error {
if _, ok := t.routes[service][sum]; !ok {
t.routes[service][sum] = r
go t.sendEvent(&Event{Type: Update, Timestamp: time.Now(), Route: r})
return nil
}
t.routes[service][sum] = r
go t.sendEvent(&Event{Type: Update, Timestamp: time.Now(), Route: r})
return nil
}