Fix non-totality of PullToRefreshAttacher in MainActivity
f71aebe fixes a crash that occurred when HRF or Datagrepper were offline or threw an error. But it creates a new issue in that it is possible to enter a state in which the newsfeed becomes unusable until the app is restarted. We should have a timeout in place and mark the refresh "complete" after a few seconds (and show a toast with an error).
I have a patch in rough working condition that determines whether a host supports IPv4 or IPv6, writes this information into the mirrorlist cache and lets mirrorlist use this information in mirror selection.
However, I thought a bit more about the problem and perhaps its best to let the client choose a mirror based on whether it can reach it or not. So it seems that the root problem is that a truncated mirror list is returned to the client.
@abompard If there is a chance that it gets merged, I could put more effort into the patch and create a pull request from it. Would you prefer to return a non-truncated mirror list or prefer to add an indication whether a host supports IPv4 or IPv6 to the mirrorlist cache?
Good question, do you have an opinion on that @adrianreber ?
Our approach until now was, that we did not look at all into IPv4 vs. IPv6. We just have mirrors with hostnames and hope that some IPv6 mirror is returned and DNF will figure it out.
It is not ideal, but I also am not aware of any users having problems with the current setup. I understand the theoretical problem but it does not seem to be a real world problem from what we hear from our users. I am not convinced it is necessary.
I am also worried that figuring out IPv4 and IPv6 support for over 1000 mirrors in the database will take a lot of time and not sure how often we should do it.