Only emit the events when actually deleting the route
This commit is contained in:
parent
f50bd400f8
commit
4f788c6fc7
@ -83,8 +83,10 @@ func (t *table) Delete(r Route) error {
|
|||||||
return ErrRouteNotFound
|
return ErrRouteNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
delete(t.routes[service], sum)
|
if _, ok := t.routes[service][sum]; ok {
|
||||||
go t.sendEvent(&Event{Type: Delete, Timestamp: time.Now(), Route: r})
|
delete(t.routes[service], sum)
|
||||||
|
go t.sendEvent(&Event{Type: Delete, Timestamp: time.Now(), Route: r})
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user