unetmsg: set TCP timeout for outgoing connections
Avoid running into long timeouts Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
784dca7e3a
commit
e29669dae1
1 changed files with 1 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue