From 33817f147b37d744846c864f5d59c4ea67a2b930 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Mon, 12 Mar 2001 19:38:39 +0000 Subject: [PATCH] Set timeout on data socket, to avoid hangs due to no keepalive packets. --- test/testsrvr.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/testsrvr.lua b/test/testsrvr.lua index 4530014..a11927f 100644 --- a/test/testsrvr.lua +++ b/test/testsrvr.lua @@ -8,6 +8,7 @@ ----------------------------------------------------------------------------- -- Read command definitions ----------------------------------------------------------------------------- +HOST = HOST or "*" assert(dofile("testcmd.lua")) test_debug_mode() @@ -33,6 +34,7 @@ function execute_command(cmd, par) if cmd == CONNECT then print("server: waiting for data connection...") data = server:accept() + data:timeout(10) if not data then fail("server: unable to start data connection!") else