diff --git a/Logic/Structure/GeographyUpdate.cs b/Logic/Structure/GeographyUpdate.cs index 04e2cc1f..93245790 100644 --- a/Logic/Structure/GeographyUpdate.cs +++ b/Logic/Structure/GeographyUpdate.cs @@ -113,13 +113,17 @@ namespace Swarmops.Logic.Structure int retries = 0; bool networkSuccess = false; + MasterGeography geography = null; + MasterCity[] cities = null; + MasterPostalCode[] postalCodes = null; + while (!networkSuccess) { try { - MasterGeography geography = geoDataLoader.GetGeographyForCountry(countryCode); - MasterCity[] cities = geoDataLoader.GetCitiesForCountry(countryCode); - MasterPostalCode[] postalCodes = geoDataLoader.GetPostalCodesForCountry(countryCode); + geography = geoDataLoader.GetGeographyForCountry(countryCode); + cities = geoDataLoader.GetCitiesForCountry(countryCode); + postalCodes = geoDataLoader.GetPostalCodesForCountry(countryCode); networkSuccess = true; } catch (Exception)