@homebridge-plugins/homebridge-ewelink 12.13.1-beta.1 → 12.13.1-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/lib/connection/ws.js +3 -6
- package/package.json +1 -1
package/lib/connection/ws.js
CHANGED
|
@@ -47,9 +47,8 @@ export default class {
|
|
|
47
47
|
}
|
|
48
48
|
const delay = Math.min(5000 * 2 ** this.retryCount, 300000)
|
|
49
49
|
this.retryCount += 1
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
50
|
+
// Log recovery at info level — users need to see that retries are happening
|
|
51
|
+
this.log('WS reconnect scheduled [%s] in %s ms (attempt %s).', reason, delay, this.retryCount)
|
|
53
52
|
this.reconnectTimer = setTimeout(() => {
|
|
54
53
|
this.reconnectTimer = null
|
|
55
54
|
this.login().catch(() => {
|
|
@@ -69,9 +68,7 @@ export default class {
|
|
|
69
68
|
this.aToken = authData.aToken
|
|
70
69
|
this.apiKey = authData.apiKey
|
|
71
70
|
this.httpHost = authData.httpHost
|
|
72
|
-
|
|
73
|
-
this.log('%s.', 'HTTP token refreshed after 406')
|
|
74
|
-
}
|
|
71
|
+
this.log('HTTP token refreshed after 406.')
|
|
75
72
|
return true
|
|
76
73
|
} catch (err) {
|
|
77
74
|
this.log.warn('%s %s.', 'HTTP token refresh failed:', parseError(err))
|
package/package.json
CHANGED