mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-10-25 18:40:17 -04:00
Fixed timeout and response rejects not being processed for single-packet requests. By JRG <fccab3ba809f89d870d5b8b2e2cdbad1> (commit 238e108678b7b5f58b770b44a817495f74595332)
This commit is contained in:
parent
06dc4ad550
commit
5cdff28703
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue