From: Felix Fietkau Date: Mon, 12 May 2025 09:00:34 +0000 (+0200) Subject: unetmsg: reconnect on loss of tx connection X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=929702fdc514c0ec77e93a407be741aa5e375b1e;p=thirdparty%2Fopenwrt.git unetmsg: reconnect on loss of tx connection Avoids half-connected broken state Signed-off-by: Felix Fietkau --- 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 cfb702ad948..cf92a67e138 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;