From 69a7e80ba00b25b1bea71fa603fc15d0da366a81 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Fri, 5 Jan 2024 18:46:01 -0800
Subject: [PATCH] Increase the connect timeout from 10 seconds (the default) to
 30 seconds

Should probably make this a command-line option too, but this will do for
now for Ragnarok to test eternal-september with.
---
 exec/newslink.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/exec/newslink.js b/exec/newslink.js
index 5a91e34438..b0f1bdb050 100644
--- a/exec/newslink.js
+++ b/exec/newslink.js
@@ -56,6 +56,7 @@ var yield_length = 1;				// Length of yield (in milliseconds)
 var max_newsgroups_per_article = 5;	// Used for spam-detection
 var unmangle = false;
 var use_xover = true;
+var connect_timeout = 30;
 
 // Parse arguments
 for(i=0;i<argc;i++) {
@@ -282,7 +283,7 @@ printf("Connecting to %s port %d ...\r\n",host,port);
 socket = new Socket();
 //socket.debug=true;
 socket.bind(0,interface_ip_address);
-if(!socket.connect(host,port)) {
+if(!socket.connect(host, port, connect_timeout)) {
 	printf("!Error %d connecting to %s port %d\r\n"
 		,socket.last_error,host,port);
 	delete socket;
-- 
GitLab