You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is unfortunately because we are mixing Promise and callback style code.
When the fetch is aborted, it returns and skips calling the errback, (amusingly the comment says // ok).
The errback is where the request would be removed from the _tileCache.inflight cache .
What we really should do is:
Anyplace we have an inflight request cache, it should be keyed off the url+method, not the tileid.
The fetch should have a finally block to remove the request from the inflight cache.
While we're at it, the AbortSignal can now have a timeout. This is a thing that all modern browsers support now - details. The default fetch timeout in Chrome is 300 seconds, but we should probably drop most requests after like 5-10sec.
(Can any requests take longer than 300 seconds? Posting a changeset? Maybe a sneaky bug lives there).
The text was updated successfully, but these errors were encountered:
This code is in the OSM service, but we might have this issue in other places where we fetch data..
Rapid/modules/services/OsmService.js
Lines 366 to 375 in acdc469
This is unfortunately because we are mixing Promise and callback style code.
When the fetch is aborted, it returns and skips calling the errback, (amusingly the comment says
// ok
).The errback is where the request would be removed from the
_tileCache.inflight
cache .What we really should do is:
fetch
should have afinally
block to remove the request from the inflight cache.AbortSignal
can now have a timeout. This is a thing that all modern browsers support now - details. The default fetch timeout in Chrome is 300 seconds, but we should probably drop most requests after like 5-10sec.The text was updated successfully, but these errors were encountered: