stiefeljackal / JworkzNeosFixFrickenSync

A mod that will fix the stuck sync bug that had plagued users since the end of 2021.
GNU General Public License v2.0
10 stars 2 forks source link

feat: Retry sync on failure #1

Closed Nihlus closed 1 year ago

Nihlus commented 1 year ago

This PR backports changes from Remora.Neos.Headless's adaption of this mod, adding the ability to retry failed sync operations. By default, the retry logic is set to retry up to three times with no delay between failures. Some errors are non-retryable and are detected with a small helper method, though it's only a best effort without any true guarantees.

These values can be configured with the retryCount and retryDelay configuration options.

Additionally, the patch is cleaned up in general, removing redundant code and tightening mutability.

This code is contributed under the original mod's MIT license, not Remora.Neos.Headless's AGPL license.