mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 21:50:18 +00:00
Added timeout to rnprobe
This commit is contained in:
parent
8f6c6b76de
commit
5872108da3
@ -110,7 +110,7 @@ def program_setup(configdir, destination_hexhash, size=None, full_name = None, v
|
||||
print("\rSent "+str(size)+" byte probe to "+RNS.prettyhexrep(destination_hash)+more+" ", end=" ")
|
||||
|
||||
i = 0
|
||||
while not receipt.status == RNS.PacketReceipt.DELIVERED:
|
||||
while receipt.status == RNS.PacketReceipt.SENT:
|
||||
time.sleep(0.1)
|
||||
print(("\b\b"+syms[i]+" "), end="")
|
||||
sys.stdout.flush()
|
||||
@ -119,6 +119,7 @@ def program_setup(configdir, destination_hexhash, size=None, full_name = None, v
|
||||
print("\b\b ")
|
||||
sys.stdout.flush()
|
||||
|
||||
if receipt.status == RNS.PacketReceipt.DELIVERED:
|
||||
hops = RNS.Transport.hops_to(destination_hash)
|
||||
if hops != 1:
|
||||
ms = "s"
|
||||
@ -160,6 +161,9 @@ def program_setup(configdir, destination_hexhash, size=None, full_name = None, v
|
||||
reception_stats
|
||||
)
|
||||
|
||||
else:
|
||||
print("Probe timed out")
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
|
Loading…
Reference in New Issue
Block a user