Software /
code /
prosody
Diff
net/server_event.lua @ 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 |
parent | 6379:a280bd6ccce2 |
child | 7223:f911f929ca6c |
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