mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-10-26 02:48:57 -04:00
Avoid extra epoll modifies when EPOLLOUT already set
This commit is contained in:
parent
5e013464da
commit
77f7632584
1 changed files with 2 additions and 1 deletions
|
|
@ -797,8 +797,9 @@ class BackboneClientInterface(Interface):
|
||||||
def process_outgoing(self, data):
|
def process_outgoing(self, data):
|
||||||
if self.online and not self.detached:
|
if self.online and not self.detached:
|
||||||
try:
|
try:
|
||||||
|
buffer_was_empty = len(self.transmit_buffer) == 0
|
||||||
self.transmit_buffer += bytes([HDLC.FLAG])+HDLC.escape(data)+bytes([HDLC.FLAG])
|
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:
|
except Exception as e:
|
||||||
RNS.log("Exception occurred while transmitting via "+str(self)+", tearing down interface", RNS.LOG_ERROR)
|
RNS.log("Exception occurred while transmitting via "+str(self)+", tearing down interface", RNS.LOG_ERROR)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue