Changeset

7222:168d03dd09c7

net.server_event: Prevent resuming connections without readcallback, eg closed connections (fixes #590)
author Kim Alvefur <zash@zash.se>
date Wed, 02 Mar 2016 16:30:05 +0100
parents 7221:56e65b1e54e8
children 7223:f911f929ca6c
files net/server_event.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_event.lua	Wed Mar 02 16:28:11 2016 +0100
+++ b/net/server_event.lua	Wed Mar 02 16:30:05 2016 +0100
@@ -289,7 +289,7 @@
 
 	function interface_mt:resume()
 		self:_lock(self.nointerface, false, self.nowriting);
-		if not self.eventread then
+		if self.readcallback and not self.eventread then
 			self.eventread = addevent( base, self.conn, EV_READ, self.readcallback, cfg.READ_TIMEOUT );  -- register callback
 		end
 	end