From 16ded2c558bacaaee2b220aee76a96c656394c6a Mon Sep 17 00:00:00 2001 From: navjot Date: Wed, 13 Jan 2021 14:14:26 +0530 Subject: [PATCH] added timer of less then 10 seconds --- src/helper_addressGenerator.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/helper_addressGenerator.py b/src/helper_addressGenerator.py index b47512b8..39e96fd0 100644 --- a/src/helper_addressGenerator.py +++ b/src/helper_addressGenerator.py @@ -30,8 +30,6 @@ def createAddressIfNeeded(label_text, streamNumberForAddress=1): defaults.networkDefaultPayloadLengthExtraBytes )) start_time = time.time() - while state.shutdown == 0 and not checkHasNormalAddress(): + while int(time.time() - start_time) < 10 and state.shutdown == 0 and not checkHasNormalAddress(): time.sleep(.2) - if int(time.time() - start_time) > 8: - break return checkHasNormalAddress()