@homebridge-plugins/homebridge-ewelink 12.15.3-beta.1 → 12.15.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/lib/connection/http.js +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,7 @@ All notable changes to `@homebridge-plugins/homebridge-ewelink` will be document
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
9
|
- chore: remove the looking-for-maintainers message
|
|
10
|
+
- fix: time out stalled http requests so device fetching cannot hang forever (#788) (@glenmarks-hub)
|
|
10
11
|
- fix: use the switch_00 param for the swv-zne irrigation valve (7047) (#778)
|
|
11
12
|
- chore(github): update the setup-node action to v7
|
|
12
13
|
|
package/lib/connection/http.js
CHANGED
|
@@ -30,7 +30,10 @@ export default class {
|
|
|
30
30
|
this.username = platform.config.username
|
|
31
31
|
|
|
32
32
|
// Set up axios interceptor for automatic 401 token refresh
|
|
33
|
-
|
|
33
|
+
// A stalled connection would otherwise hang requests forever with no error,
|
|
34
|
+
// leaving the plugin stuck on 'fetching devices' at startup (#788).
|
|
35
|
+
// A timeout surfaces as ECONNABORTED/ETIMEDOUT, which the retry logic handles.
|
|
36
|
+
this.axiosClient = axios.create({ timeout: 30000 })
|
|
34
37
|
this.axiosClient.interceptors.response.use(
|
|
35
38
|
res => res,
|
|
36
39
|
async (err) => {
|
package/package.json
CHANGED