Software /
code /
prosody
Comparison
net/server_epoll.lua @ 7557:f0dd902534b0
net.server_epoll: Don't mistake success for an error
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 11 Aug 2016 22:49:26 +0200 |
parent | 7556:1f777b38b66c |
child | 7558:3a2fe8e10eeb |
comparison
equal
deleted
inserted
replaced
7556:1f777b38b66c | 7557:f0dd902534b0 |
---|---|
230 end | 230 end |
231 if err == "wantread" then | 231 if err == "wantread" then |
232 self:setflags(true, nil); | 232 self:setflags(true, nil); |
233 elseif err == "wantwrite" then | 233 elseif err == "wantwrite" then |
234 self:setflags(nil, true); | 234 self:setflags(nil, true); |
235 elseif err ~= "timeout" then | 235 elseif not data and err ~= "timeout" then |
236 self.listeners.ondisconnect(self, err); | 236 self.listeners.ondisconnect(self, err); |
237 self:destroy() | 237 self:destroy() |
238 return; | 238 return; |
239 end | 239 end |
240 self:setreadtimeout(); | 240 self:setreadtimeout(); |