mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-27 01:58:10 -07:00
Fixed invalid EPOLL modification error handler
This commit is contained in:
@@ -228,10 +228,10 @@ class BackboneInterface(Interface):
|
|||||||
if interface.socket:
|
if interface.socket:
|
||||||
fileno = interface.socket.fileno()
|
fileno = interface.socket.fileno()
|
||||||
if fileno in BackboneInterface.spawned_interface_filenos:
|
if fileno in BackboneInterface.spawned_interface_filenos:
|
||||||
try:
|
try: BackboneInterface.epoll.modify(fileno, select.EPOLLOUT)
|
||||||
BackboneInterface.epoll.modify(interface.socket.fileno(), select.EPOLLOUT)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.trace_exception(e)
|
RNS.log(f"Error occurred on {interface} while modifying socket EPOLL state: {e}", RNS.LOG_WARNING)
|
||||||
|
raise e
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __job():
|
def __job():
|
||||||
@@ -270,8 +270,7 @@ class BackboneInterface(Interface):
|
|||||||
spawned_interface.receive(received_bytes)
|
spawned_interface.receive(received_bytes)
|
||||||
|
|
||||||
elif client_socket and fileno == client_socket.fileno() and (event & select.EPOLLOUT):
|
elif client_socket and fileno == client_socket.fileno() and (event & select.EPOLLOUT):
|
||||||
try:
|
try: written = client_socket.send(spawned_interface.transmit_buffer)
|
||||||
written = client_socket.send(spawned_interface.transmit_buffer)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
written = 0
|
written = 0
|
||||||
if not spawned_interface.detached: RNS.log(f"Error while writing to {spawned_interface}: {e}", RNS.LOG_DEBUG)
|
if not spawned_interface.detached: RNS.log(f"Error while writing to {spawned_interface}: {e}", RNS.LOG_DEBUG)
|
||||||
|
|||||||
Reference in New Issue
Block a user