summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2025-05-12 09:00:34 +0000
committerFelix Fietkau2025-05-12 10:47:20 +0000
commit929702fdc514c0ec77e93a407be741aa5e375b1e (patch)
treec1bf06a9bd5b8a7fdae09e6b9e4e303f4632b89c
parent44ef34350095c86227ea0cf84b816258c5195e29 (diff)
downloadopenwrt-929702fdc514c0ec77e93a407be741aa5e375b1e.tar.gz
unetmsg: reconnect on loss of tx connection
Avoids half-connected broken state Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc4
1 files changed, 4 insertions, 0 deletions
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;