Skip to content

Commit fcd87ba

Browse files
committed
add connection errors fixes
1 parent 5c7e8dd commit fcd87ba

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

gpxviewr/baseweb/models/gpx_file.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ def query_data_osm(self, points, around_meters, point_type, around_duplicate) ->
239239
print("OverpassGatewayTimeout - retry")
240240
time.sleep(5)
241241
return self.query_data_osm(points=points, around_meters=around_meters, point_type=point_type, around_duplicate=around_duplicate)
242+
except (ConnectionResetError, ConnectionError, ConnectionRefusedError):
243+
print("Connections Errors")
244+
time.sleep(5)
245+
return self.query_data_osm(points=points, around_meters=around_meters, point_type=point_type, around_duplicate=around_duplicate)
242246

243247
for node in result.get_nodes():
244248
wp = GPXTrackWayPoint(

0 commit comments

Comments
 (0)