Comparison

net/server_epoll.lua @ 9994:524b8cd76780 0.11

net.server_epoll: Restore wantread flag after pause (fixes #1354) If a chunk of data has been received that is larger than the amount read at a time, then the connection is paused for a short time after which it tries to read some more. If, after that, there is still more data to read, it should do the same thing. However, because the "want read" flag is removed and was restored after the delayed reading, it would not schedule another delayed read.
author Kim Alvefur <zash@zash.se>
date Sat, 04 May 2019 04:23:35 +0200
parent 9932:df73ca804719
child 9995:8d46ecc4bd0c
child 10059:c8c3f2eba898
comparison
equal deleted inserted replaced
9991:8cd180dc18a8 9994:524b8cd76780
598 end 598 end
599 if t == false then return; end 599 if t == false then return; end
600 self:set(false); 600 self:set(false);
601 self._pausefor = addtimer(t, function () 601 self._pausefor = addtimer(t, function ()
602 self._pausefor = nil; 602 self._pausefor = nil;
603 self:set(true);
603 if self.conn and self.conn:dirty() then 604 if self.conn and self.conn:dirty() then
604 self:onreadable(); 605 self:onreadable();
605 end 606 end
606 self:set(true);
607 end); 607 end);
608 end 608 end
609 609
610 -- Connected! 610 -- Connected!
611 function interface:onconnect() 611 function interface:onconnect()