Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce timeout for subscription sessions to avoid lost connections #425

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GSzabados
Copy link
Contributor

The timeout has been reduced from 3600 x 24 to 600, to operate as a heart beat. The total timeout was too long to handle well lost internet connections. With the reduced timeout, if the HA instance is disconnected from the internet and loose the callback connection, which is not caught by the aiohttp as an exception, the integration will re-initiate a connection as the timeout reached.

The limit set to 600, as on previous versions where the integration was failing, it was reconnecting every 300 seconds. It is the double of that for not introducing excessive load on any server.

The timeout has been reduced from 3600 x 24 to 600, to operate as a heart beat. The total timeout was too long to handle well lost internet connections. With the reduced timeout, if the HA instance is disconnected from the internet and loose the callback connection, which is not caught by the aiohttp as an exception, the integration will re-initiate a connection as the timeout reached. 

The limit set to 600, as on previous versions where the integration was failing, it was reconnecting every 300 seconds. It is the double of that for not introducing excessive load on any server.
@GSzabados GSzabados requested a review from iMicknl as a code owner February 14, 2025 10:55
@GSzabados GSzabados changed the base branch from main to beta February 14, 2025 10:57
@GSzabados GSzabados changed the base branch from beta to main February 14, 2025 11:01
@GSzabados
Copy link
Contributor Author

Please excuse me @iMicknl, I have no clue that this should be merged to beta or main.

@GSzabados
Copy link
Contributor Author

This should partially fix #398 and fixes #385 and #63

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