From 4cb62f55f6c885dd4c509e2ead55a6da36a70fc1 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 8 Oct 2016 14:07:07 +0200 Subject: net.server_event: Restore destruction of socket on read timeout (lost since e67891ad18d6) (thanks Ge0rG) --- net/server_event.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/server_event.lua b/net/server_event.lua index 2cb45553..43a19fe9 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -561,6 +561,10 @@ local function handleclient( client, ip, port, server, pattern, listener, sslctx return -1 end if EV_TIMEOUT == event and not interface.conn:dirty() and interface:onreadtimeout() ~= true then + interface.fatalerror = "timeout during receiving" + debug( "connection failed:", interface.fatalerror ) + interface:_close() + interface.eventread = nil return -1 -- took too long to get some data from client -> disconnect end if interface._usingssl then -- handle luasec -- cgit v1.2.3