The internet connection check was not working in Flatpak

This commit is contained in:
Faugus
2025-11-01 01:30:06 -03:00
parent bbda2da42f
commit 48e2903eb0
5 changed files with 8 additions and 12 deletions

View File

@@ -38,7 +38,7 @@ sudo dpkg --add-architecture i386
sudo apt update sudo apt update
sudo apt install -y wget sudo apt install -y wget
mkdir -p ~/faugus-launcher mkdir -p ~/faugus-launcher
wget -P ~/faugus-launcher https://github.com/Faugus/faugus-launcher/releases/download/1.9.8/faugus-launcher_1.9.8-1_all.deb wget -P ~/faugus-launcher https://github.com/Faugus/faugus-launcher/releases/download/1.9.9/faugus-launcher_1.9.9-1_all.deb
sudo apt install -y ~/faugus-launcher/*.deb sudo apt install -y ~/faugus-launcher/*.deb
sudo rm -r ~/faugus-launcher sudo rm -r ~/faugus-launcher
``` ```

View File

@@ -81,11 +81,10 @@
</screenshot> </screenshot>
</screenshots> </screenshots>
<releases> <releases>
<release version="1.9.8-1" date="2025-10-30"> <release version="1.9.9-1" date="2025-11-01">
<description> <description>
<ul> <ul>
<li>Hotfix: now checking the internet connection using the GitHub address</li> <li>Hotfix: the internet connection check was not working on Flatpak</li>
<li>Updated Dutch translation</li>
</ul> </ul>
</description> </description>
</release> </release>

View File

@@ -87,11 +87,10 @@
</screenshot> </screenshot>
</screenshots> </screenshots>
<releases> <releases>
<release version="1.9.8-1" date="2025-10-30"> <release version="1.9.9-1" date="2025-11-01">
<description> <description>
<ul> <ul>
<li>Hotfix: now checking the internet connection using the GitHub address</li> <li>Hotfix: the internet connection check was not working on Flatpak</li>
<li>Updated Dutch translation</li>
</ul> </ul>
</description> </description>
</release> </release>

View File

@@ -2121,11 +2121,9 @@ class Main(Gtk.Window):
def check_internet_connection(): def check_internet_connection():
try: try:
host = "www.github.com" socket.gethostbyname("github.com")
socket.gethostbyname(host)
socket.create_connection((host, 80), timeout=5)
return True return True
except (socket.gaierror, OSError): except socket.gaierror:
return False return False
if add_game_dialog.combobox_launcher.get_active() != 0 and add_game_dialog.combobox_launcher.get_active() != 1: if add_game_dialog.combobox_launcher.get_active() != 0 and add_game_dialog.combobox_launcher.get_active() != 1:

View File

@@ -1,6 +1,6 @@
project( project(
'faugus-launcher', 'faugus-launcher',
version: '1.9.8', version: '1.9.9',
meson_version: '>=1.2.0', meson_version: '>=1.2.0',
license: 'MIT', license: 'MIT',
license_files: 'LICENSE', license_files: 'LICENSE',