verse: Enable TCP keepalives

Tue, 05 May 2015 01:08:20 +0200

author
Kim Alvefur <zash@zash.se>
date
Tue, 05 May 2015 01:08:20 +0200
changeset 382
479b856a910f
parent 381
65533afab352
child 383
72be3c2cf602

verse: Enable TCP keepalives

init.lua file | annotate | diff | comparison | revisions
--- 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

mercurial