v2
v2 copied to clipboard
Don't try and refresh feeds endlessly when the internet is down.
If Miniflux doesn't have an internet connection, when feed refreshes occur, it will try each feed three times (by default, this is configurable by the POLLING_PARSING_ERROR_LIMIT option) and then give up. Of course, since the internet is down all feeds will fail and get into this stuck state. So when the internet comes back up, the feeds will have been marked as broken and won't get refreshed.
My suggestion is that the internet being down should inhibit this feature, as the feeds will be perfectly likely to be online after the internet comes back.
This could be implemented several ways, two suggestions:
- After a feed fails to load with a likely error, check the internet connection. If it's down, don't count this 'failure' towards the limit.
- Regularly check the internet connection (or before fetching a feed). If it's down, suspend feed processing until it comes back.
Internet connection could be checked using a known-good endpoint like the one used by browsers to detect captive portals. Or to something configurable by the user?
Since the user could deliberately have miniflux disconnected from the internet, perhaps the first suggestion is better? There would also need to be a config option to disable this - like IGNORE_POLLING_PARSING_ERROR_LIMIT_NO_INTERNET set to true by default.
I'm happy to make a patch for this, but would like some advice on the best approach, and if this is a feature you would be willing to accept.