mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-07-26 08:15:24 -04:00
Cleanup
This commit is contained in:
parent
4cd94c776a
commit
7170573da7
4 changed files with 8 additions and 5 deletions
|
@ -62,7 +62,7 @@ class LocalClientInterface(Interface):
|
||||||
self.HW_MTU = 262144
|
self.HW_MTU = 262144
|
||||||
self.online = False
|
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
|
else: self.socket_path = None
|
||||||
|
|
||||||
self.IN = True
|
self.IN = True
|
||||||
|
@ -341,7 +341,7 @@ class LocalServerInterface(Interface):
|
||||||
self.online = False
|
self.online = False
|
||||||
self.clients = 0
|
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
|
else: self.socket_path = None
|
||||||
|
|
||||||
self.IN = True
|
self.IN = True
|
||||||
|
|
|
@ -2219,7 +2219,7 @@ class Transport:
|
||||||
if cached_packet:
|
if cached_packet:
|
||||||
# The packet was found in the local cache,
|
# The packet was found in the local cache,
|
||||||
# replay it to the Transport instance.
|
# replay it to the Transport instance.
|
||||||
Transport.inbound(packet.raw, packet.receiving_interface)
|
Transport.inbound(cached_packet.raw, cached_packet.receiving_interface)
|
||||||
else:
|
else:
|
||||||
# The packet is not in the local cache,
|
# The packet is not in the local cache,
|
||||||
# query the network.
|
# query the network.
|
||||||
|
|
|
@ -586,9 +586,11 @@ def fetch(configdir, verbosity = 0, quietness = 0, destination = None, file = No
|
||||||
else:
|
else:
|
||||||
print("\n"+str(file)+" fetched from "+RNS.prettyhexrep(destination_hash))
|
print("\n"+str(file)+" fetched from "+RNS.prettyhexrep(destination_hash))
|
||||||
link.teardown()
|
link.teardown()
|
||||||
|
time.sleep(0.1)
|
||||||
RNS.exit(0)
|
RNS.exit(0)
|
||||||
|
|
||||||
link.teardown()
|
link.teardown()
|
||||||
|
time.sleep(0.1)
|
||||||
RNS.exit(0)
|
RNS.exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,9 @@ def program_setup(configdir, verbosity = 0, quietness = 0, service = False):
|
||||||
if reticulum.is_connected_to_shared_instance:
|
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)
|
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:
|
else:
|
||||||
if RNS.Reticulum.get_instance().shared_instance_interface:
|
# TODO: Rethink why this was added
|
||||||
RNS.Reticulum.get_instance().shared_instance_interface.server.daemon_threads = True
|
# 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)
|
RNS.log("Started rnsd version {version}".format(version=__version__), RNS.LOG_NOTICE)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue