[openwrt/openwrt] unetmsg: reconnect on loss of tx connection

LEDE Commits lede-commits at lists.infradead.org
Mon May 12 03:47:37 PDT 2025


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/929702fdc514c0ec77e93a407be741aa5e375b1e

commit 929702fdc514c0ec77e93a407be741aa5e375b1e
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon May 12 11:00:34 2025 +0200

    unetmsg: reconnect on loss of tx connection
    
    Avoids half-connected broken state
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc b/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc
index cfb702ad94..cf92a67e13 100644
--- a/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc
+++ b/package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc
@@ -337,6 +337,10 @@ function network_open_channel(net, name, peer)
 			delete net.tx_channels[sock_data.name];
 
 		network_tx_socket_close(sock_data);
+		if (net.timer.remaining() > 0)
+			return;
+
+		net.timer.set(sock_data.auth ? 100 : 10000);
 	};
 
 	sock_data.socket = sock;




More information about the lede-commits mailing list