mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-30 00:51:58 +01:00
[insteon] Limit device request failure condition (#18136)
Signed-off-by: Jeremy Setton <jeremy.setton@gmail.com>
This commit is contained in:
parent
1357374746
commit
bf134657cc
@ -563,7 +563,6 @@ public abstract class BaseDevice<@NonNull T extends DeviceAddress, @NonNull S ex
|
||||
* @param feature the feature queried
|
||||
*/
|
||||
protected void featureQueriedAnswered(DeviceFeature feature) {
|
||||
// store current failed request count
|
||||
int prevCount = failedRequestCount;
|
||||
// reset failed request count
|
||||
failedRequestCount = 0;
|
||||
@ -583,8 +582,11 @@ public abstract class BaseDevice<@NonNull T extends DeviceAddress, @NonNull S ex
|
||||
* @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);
|
||||
|
Loading…
Reference in New Issue
Block a user