From 5cdff2870379130a52568c3af64831fd5c94167c Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 29 Sep 2026 12:08:11 +0200 Subject: [PATCH] Fixed timeout and response rejects not being processed for single-packet requests. By JRG (commit 238e108678b7b5f58b770b44a817495f74595332) --- RNS/Link.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RNS/Link.py b/RNS/Link.py index 449e04a7..8d5079da 100644 --- a/RNS/Link.py +++ b/RNS/Link.py @@ -1395,7 +1395,7 @@ class RequestReceipt(): time.sleep(0.1) def request_timed_out(self, packet_receipt): - if self in self.link.pending_requests and self.status == RequestReceipt.DELIVERED: + if self in self.link.pending_requests and self.status in [RequestReceipt.DELIVERED, RequestReceipt.SENT]: self.status = RequestReceipt.FAILED self.concluded_at = time.time() self.link.pending_requests.remove(self) @@ -1405,7 +1405,7 @@ class RequestReceipt(): except Exception as e: RNS.log("Error while executing request timed out callback from "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR) def response_rejected(self): - if self in self.link.pending_requests and self.status == RequestReceipt.DELIVERED: + if self in self.link.pending_requests and self.status in [RequestReceipt.DELIVERED, RequestReceipt.SENT]: self.status = RequestReceipt.FAILED self.concluded_at = time.time() self.link.pending_requests.remove(self)