Diff

init.lua @ 382:479b856a910f

verse: Enable TCP keepalives
author Kim Alvefur <zash@zash.se>
date Tue, 05 May 2015 01:08:20 +0200
parent 368:154c2f04d73b
child 385:e6bf19ad5c19
line wrap: on
line diff
--- a/init.lua	Fri May 01 23:33:08 2015 +0200
+++ b/init.lua	Tue May 05 01:08:20 2015 +0200
@@ -119,6 +119,7 @@
 	-- Create and initiate connection
 	local conn = socket.tcp()
 	conn:settimeout(0);
+	conn:setoption("keepalive", true);
 	local success, err = conn:connect(connect_host, connect_port);
 	
 	if not success and err ~= "timeout" then