mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-12-26 07:59:36 -05: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=" ")
|
print("\rSent "+str(size)+" byte probe to "+RNS.prettyhexrep(destination_hash)+more+" ", end=" ")
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
while not receipt.status == RNS.PacketReceipt.DELIVERED:
|
while receipt.status == RNS.PacketReceipt.SENT:
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
print(("\b\b"+syms[i]+" "), end="")
|
print(("\b\b"+syms[i]+" "), end="")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
@ -119,6 +119,7 @@ def program_setup(configdir, destination_hexhash, size=None, full_name = None, v
|
|||||||
print("\b\b ")
|
print("\b\b ")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
if receipt.status == RNS.PacketReceipt.DELIVERED:
|
||||||
hops = RNS.Transport.hops_to(destination_hash)
|
hops = RNS.Transport.hops_to(destination_hash)
|
||||||
if hops != 1:
|
if hops != 1:
|
||||||
ms = "s"
|
ms = "s"
|
||||||
@ -160,6 +161,9 @@ def program_setup(configdir, destination_hexhash, size=None, full_name = None, v
|
|||||||
reception_stats
|
reception_stats
|
||||||
)
|
)
|
||||||
|
|
||||||
|
else:
|
||||||
|
print("Probe timed out")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
Reference in New Issue
Block a user