Diff

client.lua @ 444:12c1be0044c6

client: Send whitespace keeplives This is to prevent net.server from timing out connections.
author Kim Alvefur <zash@zash.se>
date Sun, 06 Jun 2021 16:43:36 +0200
parent 430:b1f7214c6ec2
child 452:628896d39d8e
line wrap: on
line diff
--- a/client.lua	Wed Feb 17 14:57:59 2021 +0100
+++ b/client.lua	Sun Jun 06 16:43:36 2021 +0200
@@ -91,6 +91,7 @@
 
 	self:hook("connected", function () self:reopen(); end);
 	self:hook("incoming-raw", function (data) return self.data(self.conn, data); end);
+	self:hook("read-timeout", function () self:send(" "); return true; end, -1);
 
 	self.curr_id = 0;