gis-ops / valhalla-app

This is the demo web app running on https://valhalla.openstreetmap.de
https://valhalla.openstreetmap.de
MIT License
157 stars 87 forks source link

[BUG] Race conditions in api calls #139

Open sandstone991 opened 1 year ago

sandstone991 commented 1 year ago

Description

What is the problem you are facing

Currently in the entire app race conditions resulting from consecutive api calls isn't handled, which can cause wrong information to be displayed to the user especially on mobile phones where connection can be slower, I mentioned this bug before in an eariler pull request #135 I thought it was unique to just this component but upon further testing this problem is in the height and route api as well

What is your suggested solution

We can look at how osm for example handles this, they cancel any pending request but the last one and thus showing the output of the most recent input image