I have run across a race between nwamd and network/location setting location/selected property.
1. network/location and nwam are both disabled. 2. nwam is enabled. 3. nwamd enables network/location 4. nwamd sets/creates location/selected property to the appropriate location. 5. nwamd refreshes network/location What I've noticed is that sometimes network/location does not see the newly created/updated location/selected property. Thus, it decides that the property doesn't exist and sets and activates the NoNet location. nwamd meanwhile is happily thinking that it has activated the right location (checking the active_loc variable). I can see two solutions to this: 1. rather than starting network/location right away, nwamd refreshes and (re)starts network/location only after checking the location conditions. 2. Rather than rely on active_loc, nwamd checks the location/selected property when the periodic conditions are checked. This way it know the actual location that's active. There's a delay before the correct location becomes active. I prefer the first solution as there's no lag and NoNet is not activated. What are folks' view on this? Thanks, Anurag
