Fixed typos. Fixed missing lock.

This commit is contained in:
Mark Qvist 2026-04-25 18:45:21 +02:00
parent 7d502306ea
commit a8b519e06e

View file

@ -361,6 +361,7 @@ class ReticulumGitNode():
if self.announce_interval and time.time() > self.last_announce + self.announce_interval: self.announce()
if time.time() > self.last_link_clean + self.link_clean_interval:
stale_links = []
with self.active_links_lock:
for link_id in self.active_links:
link = self.active_links[link_id]
if not link.status == RNS.Link.ACTIVE: stale_links.append(link_id)
@ -369,7 +370,7 @@ class ReticulumGitNode():
for link_id in stale_links:
link = None
with self.active_links_lock:
if link_id in stale_links:
if link_id in self.active_links:
link = self.active_links.pop(link_id)
cleaned_links += 1
@ -416,7 +417,7 @@ class ReticulumGitNode():
self.destination.register_request_handler(self.PATH_LIST, self.handle_list, allow=self.global_allow, allowed_list=ga_list)
self.destination.register_request_handler(self.PATH_FETCH, self.handle_fetch, allow=self.global_allow, allowed_list=ga_list)
self.destination.register_request_handler(self.PATH_PUSH, self.handle_push, allow=self.global_allow, allowed_list=ga_list)
self.destination.register_request_handler(self.PATH_DELETE, self.handle_list, allow=self.global_allow, allowed_list=ga_list)
self.destination.register_request_handler(self.PATH_DELETE, self.handle_delete, allow=self.global_allow, allowed_list=ga_list)
def remote_connected(self, link):
RNS.log(f"Peer connected to {self.destination}", RNS.LOG_DEBUG)