mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-24 08:02:32 +02:00
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)
|
return nil, fmt.Errorf("failed listing routes: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
r.RLock()
|
if r.options.Advertise == All {
|
||||||
advertStrategy := r.options.Advertise
|
|
||||||
r.RUnlock()
|
|
||||||
|
|
||||||
if advertStrategy == All {
|
|
||||||
// build a list of events to advertise
|
// build a list of events to advertise
|
||||||
events := make([]*Event, len(routes))
|
events := make([]*Event, len(routes))
|
||||||
for i, route := range routes {
|
for i, route := range routes {
|
||||||
|
Loading…
Reference in New Issue
Block a user