From 77f763258441fb9ce71db084703b64608559211d Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 24 Aug 2026 20:52:23 +0200 Subject: [PATCH] Avoid extra epoll modifies when EPOLLOUT already set --- RNS/Interfaces/BackboneInterface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RNS/Interfaces/BackboneInterface.py b/RNS/Interfaces/BackboneInterface.py index 27e22bb7..d503eea4 100644 --- a/RNS/Interfaces/BackboneInterface.py +++ b/RNS/Interfaces/BackboneInterface.py @@ -797,8 +797,9 @@ class BackboneClientInterface(Interface): def process_outgoing(self, data): if self.online and not self.detached: try: + buffer_was_empty = len(self.transmit_buffer) == 0 self.transmit_buffer += bytes([HDLC.FLAG])+HDLC.escape(data)+bytes([HDLC.FLAG]) - BackboneInterface.tx_ready(self) + if buffer_was_empty: BackboneInterface.tx_ready(self) except Exception as e: RNS.log("Exception occurred while transmitting via "+str(self)+", tearing down interface", RNS.LOG_ERROR)