Comparison

net/server_epoll.lua @ 7588:fd6ca110edce

net.server_epoll: Don't call ondrain when connection is to be closed
author Kim Alvefur <zash@zash.se>
date Thu, 18 Aug 2016 16:05:18 +0200
parent 7587:ff81a34bffb0
child 7589:125e4f2e0b65
comparison
equal deleted inserted replaced
7587:ff81a34bffb0 7588:fd6ca110edce
305 self:destroy(); 305 self:destroy();
306 end 306 end
307 end 307 end
308 308
309 function interface:ondrain() 309 function interface:ondrain()
310 self:on("drain"); 310 if self._toclose then
311 if self._starttls then 311 return self:close();
312 self:starttls(); 312 elseif self._starttls then
313 elseif self._toclose then 313 return self:starttls();
314 self:close(); 314 else
315 return self:on("drain");
315 end 316 end
316 end 317 end
317 318
318 function interface:write(data) 319 function interface:write(data)
319 local buffer = self.writebuffer; 320 local buffer = self.writebuffer;