Fix V1Channel reconnection by falling back to cache when MQTT fails #1983
ci.yml
on: pull_request
Matrix: test
Lint Commit Messages
15s
lint
19s
Build Package
10s
Test Semantic Release
46s
release
0s
Annotations
2 errors
|
Lint Commit Messages
You have commit messages with errors
⧗ input: Fix V1Channel reconnection by falling back to cache when MQTT fails
When the device disconnects from the internet, the MQTT connection may also be unavailable. Previously, `V1Channel` would force a fresh network info lookup via MQTT during reconnection attempts if the cache was stale or on the first retry, leading to repeated failures.
This change adds a fallback mechanism: if the MQTT request for network info fails, we check if we have cached network info. If so, we use it (with a warning) to attempt a local connection. This allows the device to reconnect locally even if the cloud is temporarily unreachable.
Added `tests/devices/test_v1_channel_reconnect.py` to verify this behavior.
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 2 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
⧗ input: Fix linting in test_v1_channel_reconnect.py
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 2 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
|
|
lint
Process completed with exit code 1.
|