diff --git a/setup.cfg b/setup.cfg index b25ba47..96cb006 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pyduke-energy -version = 1.0.4 +version = 1.0.5 author = Michael Meli author_email = mjmeli94@gmail.com description = Python Wrapper for unofficial Duke Energy REST API diff --git a/src/pyduke_energy/const.py b/src/pyduke_energy/const.py index 05d89ca..ef4079c 100644 --- a/src/pyduke_energy/const.py +++ b/src/pyduke_energy/const.py @@ -36,7 +36,7 @@ MESSAGE_TIMEOUT_RETRY_COUNT = 3 # number of times a message timeout can occur before we totally give up (allow 2 fastpolls) -MESSAGE_TIMEOUT_GIVE_UP_COUNT = ((FASTPOLL_TIMEOUT_MIN * 60) / MESSAGE_TIMEOUT_SEC) + 1 +MESSAGE_TIMEOUT_GIVE_UP_COUNT = 2 * FASTPOLL_TIMEOUT_MIN * 60 / MESSAGE_TIMEOUT_SEC # in minutes, minimum amount of time to wait before retrying connection on forever loop FOREVER_RETRY_MIN_MINUTES = 1