Ensure ImportThread is always terminated.
@@ -264,6 +264,7 @@ public class NominatimConnector {
ImportThread importThread = new ImportThread(importer);
+ try {
template.query(SELECT_COLS_PLACEX + " FROM placex " +
" WHERE linked_place_id IS NULL AND centroid IS NOT NULL " + andCountryCodeStr +
" ORDER BY geometry_sector, parent_place_id; ", rs -> {
@@ -288,8 +289,10 @@ public class NominatimConnector {
}
});
+ } finally {
importThread.finish();
}
+ }
/**
* querying nominatim's address hierarchy to complete photon doc with missing data (like country, city, street, ...)
