From 513a82e3631007d27bbe6fbf10186e92560ed0cd Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 9 Jun 2022 17:14:43 +0200 Subject: [PATCH] Updated link test --- RNS/Interfaces/TCPInterface.py | 4 ++-- tests/link.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/RNS/Interfaces/TCPInterface.py b/RNS/Interfaces/TCPInterface.py index e4e6340..5e8e2ac 100644 --- a/RNS/Interfaces/TCPInterface.py +++ b/RNS/Interfaces/TCPInterface.py @@ -248,8 +248,8 @@ class TCPClientInterface(Interface): def processOutgoing(self, data): if self.online: - while self.writing: - time.sleep(0.01) + # while self.writing: + # time.sleep(0.01) try: self.writing = True diff --git a/tests/link.py b/tests/link.py index b13a27a..8c0c018 100644 --- a/tests/link.py +++ b/tests/link.py @@ -165,8 +165,9 @@ def targets(): def resource_concluded(resource): print("Resource concluded") - rx_pr = (resource.link.attached_interface.rxb*8)/resource.link.attached_interface.rxptime - print("Average RX proccessing rate: "+size_str(rx_pr, "b")+"ps") + if hasattr(resource.link.attached_interface, "rxptime"): + rx_pr = (resource.link.attached_interface.rxb*8)/resource.link.attached_interface.rxptime + print("Average RX proccessing rate: "+size_str(rx_pr, "b")+"ps") def link_established(link): print("Link established")