Avoid locking on reading strategy for now
This commit is contained in:
parent
837597fe6f
commit
d5ce96da24
@ -682,11 +682,7 @@ func (r *router) flushRouteEvents(evType EventType) ([]*Event, error) {
|
||||
return nil, fmt.Errorf("failed listing routes: %s", err)
|
||||
}
|
||||
|
||||
r.RLock()
|
||||
advertStrategy := r.options.Advertise
|
||||
r.RUnlock()
|
||||
|
||||
if advertStrategy == All {
|
||||
if r.options.Advertise == All {
|
||||
// build a list of events to advertise
|
||||
events := make([]*Event, len(routes))
|
||||
for i, route := range routes {
|
||||
|
Loading…
Reference in New Issue
Block a user