Skip to content

fix(network): add timeout to prevent app freeze on slow network - #5

Open
MedCy1 wants to merge 1 commit into
Ascendara:mainfrom
MedCy1:fix/add-request-timeouts
Open

fix(network): add timeout to prevent app freeze on slow network#5
MedCy1 wants to merge 1 commit into
Ascendara:mainfrom
MedCy1:fix/add-request-timeouts

Conversation

@MedCy1

@MedCy1 MedCy1 commented Jan 4, 2026

Copy link
Copy Markdown

Fix: Add network timeouts to prevent app freeze

What does this PR do?
This PR adds a 5-second timeout to the network requests used for fetching the application logo and the version information in ui/main_window.py.

Why is this change necessary?
By default, the Python requests library has no timeout. If the user has a slow internet connection, or if the remote server hangs/drops packets, the installer could freeze indefinitely (blocking the UI) while waiting for a response.

Adding a specific timeout ensures the application fails gracefully (and continues loading) rather than hanging completely during startup.

Key Changes:

  • Added timeout=5 parameter to the requests.get() call for the remote logo URL.
  • Added timeout=5 parameter to the requests.get() call for the Ascendara API version check.

How to test:

  1. Run the installer (python app.py).
  2. Verify that the logo and version number still load correctly on a working internet connection (ensure no regression).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant