Skip to content

Fix unhandled TimeoutError in connect() - #17

Open
Jacob-White-96 wants to merge 1 commit into
ProtonVPN:stablefrom
Jacob-White-96:fix/unhandled-timeout-in-connect-v2
Open

Fix unhandled TimeoutError in connect()#17
Jacob-White-96 wants to merge 1 commit into
ProtonVPN:stablefrom
Jacob-White-96:fix/unhandled-timeout-in-connect-v2

Conversation

@Jacob-White-96

Copy link
Copy Markdown

Fix unhandled TimeoutError in connect() when kill switch cleanup times out

When connect() calls disconnect() as cleanup after a failed connection attempt, the TimeoutError raised by the kill switch NetworkManager cleanup was not caught, causing an unhandled exception crash instead of a graceful failure.

This fix wraps the disconnect() call in a try/except block to catch TimeoutError, allowing the program to fail gracefully.

…s out

When connect() calls disconnect() as cleanup after a failed connection
attempt, the TimeoutError raised by the kill switch NetworkManager
cleanup was not caught, causing an unhandled exception crash instead
of a graceful failure.

This fix wraps the disconnect() call in a try/except block to catch
TimeoutError, allowing the program to fail gracefully.
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