Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
7221:56e65b1e54e8 | 7222:168d03dd09c7 |
---|---|
287 return self:_lock(self.nointerface, true, self.nowriting); | 287 return self:_lock(self.nointerface, true, self.nowriting); |
288 end | 288 end |
289 | 289 |
290 function interface_mt:resume() | 290 function interface_mt:resume() |
291 self:_lock(self.nointerface, false, self.nowriting); | 291 self:_lock(self.nointerface, false, self.nowriting); |
292 if not self.eventread then | 292 if self.readcallback and not self.eventread then |
293 self.eventread = addevent( base, self.conn, EV_READ, self.readcallback, cfg.READ_TIMEOUT ); -- register callback | 293 self.eventread = addevent( base, self.conn, EV_READ, self.readcallback, cfg.READ_TIMEOUT ); -- register callback |
294 end | 294 end |
295 end | 295 end |
296 | 296 |
297 function interface_mt:counter(c) | 297 function interface_mt:counter(c) |