added timer of less then 10 seconds

This commit is contained in:
navjot 2021-01-13 14:14:26 +05:30
parent 14a4f42fc0
commit ac23a397a1
No known key found for this signature in database
GPG Key ID: 9EE70AFD71357F1C
1 changed files with 1 additions and 3 deletions

View File

@ -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()