aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_event.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-03-02 16:30:05 +0100
committerKim Alvefur <zash@zash.se>2016-03-02 16:30:05 +0100
commit427e4d1657d119002b2ac24e233902ba1d8f8574 (patch)
treed3f29efc5a1f7579a3adbade1892933d2e899594 /net/server_event.lua
parent6a35d1aefe30d36f91aec3f9303a265cff94d2a0 (diff)
downloadprosody-427e4d1657d119002b2ac24e233902ba1d8f8574.tar.gz
prosody-427e4d1657d119002b2ac24e233902ba1d8f8574.zip
net.server_event: Prevent resuming connections without readcallback, eg closed connections (fixes #590)
Diffstat (limited to 'net/server_event.lua')
-rw-r--r--net/server_event.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server_event.lua b/net/server_event.lua
index 45938a13..a60de08e 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -289,7 +289,7 @@ do
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