Changeset

7688:88ad2d5bcf80

net.server_event: Restore destruction of socket on read timeout (lost since e67891ad18d6) (thanks Ge0rG)
author Kim Alvefur <zash@zash.se>
date Sat, 08 Oct 2016 14:07:07 +0200
parents 7685:8e43a05e2374
children 7689:97c013e8f002
files net/server_event.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_event.lua	Tue Oct 04 15:46:24 2016 +0200
+++ b/net/server_event.lua	Sat Oct 08 14:07:07 2016 +0200
@@ -561,6 +561,10 @@
 			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