From e29669dae13b0183e0ace39d369d5f193a664443 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 30 May 2025 21:38:31 +0200 Subject: [PATCH] unetmsg: set TCP timeout for outgoing connections Avoid running into long timeouts Signed-off-by: Felix Fietkau --- .../unetmsg/files/usr/share/ucode/unetmsg/unetmsgd-remote.uc | 1 + 1 file changed, 1 insertion(+) 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 65cdfac04ad..b6bf33b3998 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 @@ -300,6 +300,7 @@ function network_open_channel(net, name, peer) return; core.dbg(`Try to connect to ${name}\n`); + sock.setopt(socket.SOL_TCP, socket.TCP_USER_TIMEOUT, 30 * 1000); sock.connect(addr); let auth_data_cb = (msg) => { if (!network_auth_valid(sock_data.name, sock_data.id, msg.token))