Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[insteon] Limit device request failure condition #18136

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ private long checkFeatureQueried(long now) {
* @param feature the feature queried
*/
protected void featureQueriedAnswered(DeviceFeature feature) {
// store current failed request count
int prevCount = failedRequestCount;
// reset failed request count
failedRequestCount = 0;
Expand All @@ -583,8 +582,11 @@ protected void featureQueriedAnswered(DeviceFeature feature) {
* @param feature the feature queried
*/
protected void featureQueriedFailed(DeviceFeature feature) {
// increase failed request count
failedRequestCount++;
QueryStatus queryStatus = feature.getQueryStatus();
// increase failed request count if in sent or acked status
if (queryStatus == QueryStatus.QUERY_SENT || queryStatus == QueryStatus.QUERY_ACKED) {
failedRequestCount++;
}
// mark feature queried as processed and never queried
setFeatureQueried(null);
feature.setQueryMessage(null);
Expand Down