Changeset

152:c729365f1091

clix.raw: Handle (ignore, successfully) read timeouts on stdin So that net.server doesn't get upset if you're not typing something regularly.
author Kim Alvefur <zash@zash.se>
date Sat, 10 Apr 2021 00:25:44 +0200
parents 151:5398623682d7
children 153:56546fb3429b
files clix/raw.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/clix/raw.lua	Sat Apr 10 00:25:20 2021 +0200
+++ b/clix/raw.lua	Sat Apr 10 00:25:44 2021 +0200
@@ -108,7 +108,7 @@
 				end
 			end
 			stdin = require "net.server".wrapclient(stdin, "stdin", 0, {
-				onincoming = on_incoming, ondisconnect = function () conn:close() end,
+				onincoming = on_incoming, ondisconnect = function () conn:close() end, onreadtimeout = function () return true; end
 				}, "*l");
 		else
 			if not send_xml then