Jump to content

Implementing Retry Logic When Loader Fails

Recommended Posts



I'm trying to implement some retry logic for when Loader fails to load an asset. Currently I've extended the Loader class, and I'm playing around with altering the fileError method to retry downloading the same asset if it fails, but I'm not quite sure what to add here.


Has anyone done anything like this before?



Link to post
Share on other sites
  • 2 years later...

2 years later, I came across the same need for Loader retry.

A good solution seem to be to implement your own logic for keeping track of assets and updating them by subscribing to the 'load' and 'error' events. Then, at the end of the loader queue, create a new Loader, add only the failed assets and call load().

Alternatively, in case you want to retry for each asset immediately on fail, it may be possible to call directly the Resource's load function, but I haven't tested it and doesn't seem like a good solution.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...