Skip to content

Commit

Permalink
Fix account going offline every few seconds (openhab#14300)
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Kreuzer <kai@openhab.org>
  • Loading branch information
kaikreuzer authored and psmedley committed Feb 23, 2023
1 parent f7a3720 commit ab5fadf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ protected boolean checkResponse(Response response, boolean immediatelyFail) {
} else {
logger.warn("Reached the maximum number of errors ({}) for the current interval ({} seconds)",
API_MAXIMUM_ERRORS_IN_INTERVAL, API_ERROR_INTERVAL_SECONDS);
apiIntervalErrors = 0;
}

updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR);
} else if ((System.currentTimeMillis() - apiIntervalTimestamp) > 1000 * API_ERROR_INTERVAL_SECONDS) {
logger.trace("Resetting the error counter. ({} errors in the last interval)", apiIntervalErrors);
Expand Down

0 comments on commit ab5fadf

Please sign in to comment.