Skip to content

add timeout to super().request(). Ducobox may sometimes hang.#18

Open
wouterteepe wants to merge 1 commit intoSikerdebaard:mainfrom
wouterteepe:timeout
Open

add timeout to super().request(). Ducobox may sometimes hang.#18
wouterteepe wants to merge 1 commit intoSikerdebaard:mainfrom
wouterteepe:timeout

Conversation

@wouterteepe
Copy link
Copy Markdown

DucoUrlSession extends requests.Session but doesn't set timeouts on HTTP calls. When super().request() is called without a timeout parameter, requests can hang indefinitely.

This is observed in pull request Sikerdebaard/hacs-ducobox-connector#39.

Instead of adding lots of code to that library, let's address it at the source.

The timeout is set at 15 seconds. No strong opinions on what the timeout should be, except that it should ideally be below one minute and allow some lag of the ducobox.

Please note that this issue can also occur without even using hacs-ducobox-connector, but just by using docupy itself. Or, more honestly, it occurs with the ducobox itself, which is sometimes not responsive. (I'll configure it to reboot frequently, but still the library should handle timeouts graceously).

…quest #19 of hacs-ducobox-connector in an elegant way, at the source.
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