HeroicGamesLauncher
HeroicGamesLauncher copied to clipboard
[Fix] Added check if heroic can communicate with internet (ping some common websites)
Heroic checks if internet connection is available.
Using ping command to ping google.com
, store.epicgames.com
and gog.com
.
If one succeed it will return true.
Tested on linux with a invalid url. Was succesfully marked as offline. TODO: Windows needs to be tested.
Use the following Checklist if you have changed something on the Backend or Frontend:
- [ ] Tested the feature and it's working on a current and clean install.
- [ ] Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
- [ ] Created / Updated Tests (If necessary)
- [ ] Created / Updated documentation (If necessary)
Will do some testing on windows and macOS.
Still not working as it should. If you start Heroic without internet connection and then connect again it won't update the status and wont update the game info. And GOG game pages are not working when offline as well.
Still not working as it should. If you start Heroic without internet connection and then connect again it won't update the status and wont update the game info. And GOG game pages are not working when offline as well.
Where is the status? I mean it never worked before. Every function which needs a internet connection should listen to an event then?
Btw, what do you think about make the isOnline
a boolean and create instead a interval function that checks connection each 10s. So all function which relies on the isOnline
value, does not call ping.
Actually i think this is was not needed since ariel pr!
Can we revert it?
Which PR? I still think that pinging the websites is a good thing to have.
Ah sorry thought this got also merged, because @arielj implemented a ping there aswell. https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/pull/1727
Ah sorry thought this got also merged, because @arielj implemented a ping there aswell. https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/pull/1727
A-ha. That's true I'm blind. We can revert this one then or let's wait until Ariel put it in testing :)
hey I'm traveling until the 28th so I won't have much time to continue that PR, I'll do a few more things there after I get back