Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fetch has no timeout?

I have a problem which caused me a true headache. Below is a screenshot of my databse. What you see is a unique user, the server timestamp when the recorded was inserted and the GPS coordinaties (latitude and longitude) of that user. These are users that search for golf courses nearby their location.

 

Now if you look at the GPS coordinates. They change with tens of kilomters/miles but the request has come into my server at the same time. So, these request must be atleast minutes apart. Still these come in at once. That makes me wonder, Isn't there a timeout in the Fetch function implemented? Are fetch calles stored permenantely until a succesfull connection the the url has been made?

 

I tried to test a fetch timeout, but couldnt replicate it. I tried making API calls while wifi and mobile data was switched off. Then I switched on WiFi and looked how many server requests came in, but it was none so the fetch failed I think.  I already tried implemeted the suggestions from stackoverflow about fetch timeout: https://stackoverflow.com/questions/46946380/fetch-api-request-timeout. The fitbit app doesn't seem to support the AbortController. 

 

Good thing to know, when my app is launched, I inmeaditaly search for courses nearby to speed up things. I know the companion randomly starts a lot, So I have built safeguards for that. That faseguards are. previous call atleast 10 minues before and further than 1 kilometer. the GPS coordinates below is actually someone driving to the golf course.

 

Pietero_0-1630877376638.png

 

Best Answer
0 Votes
1 REPLY 1

Seems odd. Perhaps include a timestamp within your fetch data, so you can always get the latest?

Best Answer
0 Votes