unfoldedcircle / integration-home-assistant

Home-Assistant Integration for Remote Two
Mozilla Public License 2.0
28 stars 5 forks source link

Connection timeout configuration is used as request timeout #47

Closed zehnm closed 9 months ago

zehnm commented 9 months ago

While testing the HA server communication I've noticed that the Home Assistant WebSocket connection timeout configuration is used as request timeout. The TCP connection timeout is always using the default 5s. (This is the max time allowed to connect to remote host, including DNS name resolution).

For certain setups this could be an issue and not enough time to successfully connect. It might even be a reason for the reported TLS connection issues.

Tasks:

        awc::ClientBuilder::new()
            .timeout(request_timeout)
            .connector(awc::Connector::new().timeout(connection_timeout))
            .finish()