# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1591280234 -7200
# Node ID 9e6d979dd603d92177b4486b5a8e1065155ff042
# Parent  8048255ae61edad9272ba2817480051c6af7adb0
util.adminstream: Set a read timeout handler

So that net.server doesn't close the connection on inactivity.

diff -r 8048255ae61e -r 9e6d979dd603 util/adminstream.lua
--- a/util/adminstream.lua	Thu Jun 04 16:11:08 2020 +0200
+++ b/util/adminstream.lua	Thu Jun 04 16:17:14 2020 +0200
@@ -247,6 +247,11 @@
 			sessions[conn]  = nil;
 		end
 	end
+
+	function listeners.onreadtimeout(conn)
+		conn:send(" ");
+	end
+
 	return {
 		listeners = listeners;
 	};
@@ -315,6 +320,10 @@
 		client.conn = nil;
 	end
 
+	function listeners.onreadtimeout(conn)
+		conn:send(" ");
+	end
+
 	client.listeners = listeners;
 
 	return client;