added timer of less then 10 seconds

This commit is contained in:
navjot 2021-01-13 14:14:26 +05:30 committed by Muzahid
parent d24bf4b8af
commit 16ded2c558
Signed by untrusted user: cis-muzahid
GPG Key ID: 1DC85E7D3AB613EA

View File

@ -30,8 +30,6 @@ def createAddressIfNeeded(label_text, streamNumberForAddress=1):
defaults.networkDefaultPayloadLengthExtraBytes defaults.networkDefaultPayloadLengthExtraBytes
)) ))
start_time = time.time() 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) time.sleep(.2)
if int(time.time() - start_time) > 8:
break
return checkHasNormalAddress() return checkHasNormalAddress()