Adjusted timeouts

This commit is contained in:
Mark Qvist 2023-11-02 12:25:36 +01:00
parent 082026ca1b
commit 82bb479957
3 changed files with 4 additions and 4 deletions

View File

@ -142,7 +142,7 @@ class Conversation:
self.__changed_callback = None
if not RNS.Transport.has_path(bytes.fromhex(source_hash)):
if not RNS.Identity.recall(bytes.fromhex(self.source_hash)):
RNS.Transport.request_path(bytes.fromhex(source_hash))
self.source_identity = RNS.Identity.recall(bytes.fromhex(self.source_hash))

View File

@ -517,7 +517,7 @@ class Browser:
self.status = Browser.PATH_REQUESTED
self.update_display()
pr_time = time.time()
pr_time = time.time()+RNS.Transport.first_hop_timeout(self.destination_hash)
while not RNS.Transport.has_path(self.destination_hash):
now = time.time()
if now > pr_time+self.timeout:
@ -770,7 +770,7 @@ class Browser:
self.status = Browser.PATH_REQUESTED
self.update_display()
pr_time = time.time()
pr_time = time.time()+RNS.Transport.first_hop_timeout(self.destination_hash)
while not RNS.Transport.has_path(self.destination_hash):
now = time.time()
if now > pr_time+self.timeout:

View File

@ -894,7 +894,7 @@ class ConversationWidget(urwid.WidgetWrap):
if allowed:
self.frame.contents["footer"] = (self.minimal_editor, None)
else:
warning = urwid.AttrMap(urwid.Padding(urwid.Text("\n"+g["info"]+"\n\nYou cannot currently message this peer, since it's identity keys are not known.\n\nWait for an announce to arrive from the peer, or query the network for it.\n\nTo query the network, select this conversation in the conversation list, press Ctrl-E, and use the query button.\n", align="center")), "msg_header_caution")
warning = urwid.AttrMap(urwid.Padding(urwid.Text("\n"+g["info"]+"\n\nYou cannot currently message this peer, since it's identity keys are not known. The keys have been requested from the network and should arrive shortly, if available. Close this conversation and reopen it to try again.\n\nWait for this announce to arrive from, or query the network manually.\n\nTo query the network, select this conversation in the conversation list, press Ctrl-E, and use the query button.\n", align="center")), "msg_header_caution")
self.frame.contents["footer"] = (warning, None)
def toggle_focus_area(self):