This commit is contained in:
Mark Qvist 2025-04-07 01:04:37 +02:00
parent 4cd94c776a
commit 7170573da7
4 changed files with 8 additions and 5 deletions

View File

@ -62,7 +62,7 @@ class LocalClientInterface(Interface):
self.HW_MTU = 262144
self.online = False
if RNS.vendor.platformutils.is_linux(): self.socket_path = f"\0rns/{socket_path}"
if socket_path != None and RNS.vendor.platformutils.is_linux(): self.socket_path = f"\0rns/{socket_path}"
else: self.socket_path = None
self.IN = True
@ -341,7 +341,7 @@ class LocalServerInterface(Interface):
self.online = False
self.clients = 0
if RNS.vendor.platformutils.is_linux(): self.socket_path = f"\0rns/{socket_path}"
if socket_path != None and RNS.vendor.platformutils.is_linux(): self.socket_path = f"\0rns/{socket_path}"
else: self.socket_path = None
self.IN = True

View File

@ -2219,7 +2219,7 @@ class Transport:
if cached_packet:
# The packet was found in the local cache,
# replay it to the Transport instance.
Transport.inbound(packet.raw, packet.receiving_interface)
Transport.inbound(cached_packet.raw, cached_packet.receiving_interface)
else:
# The packet is not in the local cache,
# query the network.

View File

@ -586,9 +586,11 @@ def fetch(configdir, verbosity = 0, quietness = 0, destination = None, file = No
else:
print("\n"+str(file)+" fetched from "+RNS.prettyhexrep(destination_hash))
link.teardown()
time.sleep(0.1)
RNS.exit(0)
link.teardown()
time.sleep(0.1)
RNS.exit(0)

View File

@ -42,8 +42,9 @@ def program_setup(configdir, verbosity = 0, quietness = 0, service = False):
if reticulum.is_connected_to_shared_instance:
RNS.log("Started rnsd version {version} connected to another shared local instance, this is probably NOT what you want!".format(version=__version__), RNS.LOG_WARNING)
else:
if RNS.Reticulum.get_instance().shared_instance_interface:
RNS.Reticulum.get_instance().shared_instance_interface.server.daemon_threads = True
# TODO: Rethink why this was added
# if RNS.Reticulum.get_instance().shared_instance_interface:
# RNS.Reticulum.get_instance().shared_instance_interface.server.daemon_threads = True
RNS.log("Started rnsd version {version}".format(version=__version__), RNS.LOG_NOTICE)
while True: