aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-10-08 14:07:07 +0200
committerKim Alvefur <zash@zash.se>2016-10-08 14:07:07 +0200
commit4cb62f55f6c885dd4c509e2ead55a6da36a70fc1 (patch)
treedc26e2c252778e455c295025d23ede402c55559c
parent36b9149295afd0c8b48e91c82ef0a1f8ebe7f932 (diff)
downloadprosody-4cb62f55f6c885dd4c509e2ead55a6da36a70fc1.tar.gz
prosody-4cb62f55f6c885dd4c509e2ead55a6da36a70fc1.zip
net.server_event: Restore destruction of socket on read timeout (lost since e67891ad18d6) (thanks Ge0rG)
-rw-r--r--net/server_event.lua4
1 files changed, 4 insertions, 0 deletions
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