Comparison

net/server_epoll.lua @ 7590:fd07ab702f83

net.server_epoll: Remove read timeout when waiting to read more from buffer
author Kim Alvefur <zash@zash.se>
date Thu, 18 Aug 2016 16:12:28 +0200
parent 7589:125e4f2e0b65
child 7591:138f16eb39fb
comparison
equal deleted inserted replaced
7589:125e4f2e0b65 7590:fd07ab702f83
269 elseif not data and err ~= "timeout" then 269 elseif not data and err ~= "timeout" then
270 self:on("disconnect", err); 270 self:on("disconnect", err);
271 self:destroy() 271 self:destroy()
272 return; 272 return;
273 end 273 end
274 self:setreadtimeout();
275 if self.conn:dirty() then 274 if self.conn:dirty() then
275 self:setreadtimeout(false);
276 self:pausefor(cfg.read_retry_delay); 276 self:pausefor(cfg.read_retry_delay);
277 else
278 self:setreadtimeout();
277 end 279 end
278 end 280 end
279 281
280 -- Called when socket is writable 282 -- Called when socket is writable
281 function interface:onwriteable() 283 function interface:onwriteable()