]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
unetmsg: reconnect on loss of tx connection
authorFelix Fietkau <nbd@nbd.name>
Mon, 12 May 2025 09:00:34 +0000 (11:00 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 12 May 2025 10:47:20 +0000 (12:47 +0200)
Avoids half-connected broken state

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc

index cfb702ad94875b58f187f7e9ea511755028ef2a8..cf92a67e138b0c2143f715a89e1d2c03d319013d 100644 (file)
@@ -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;