Comparison

net/server_epoll.lua @ 7594:5e884501a9ac

net.server_epoll: Prevent anything from happening to destroyed sockets
author Kim Alvefur <zash@zash.se>
date Thu, 18 Aug 2016 16:46:20 +0200
parent 7593:0266434d7df1
child 7595:166b2e0766a4
comparison
equal deleted inserted replaced
7593:0266434d7df1 7594:5e884501a9ac
349 349
350 function interface:destroy() 350 function interface:destroy()
351 self:setflags(false, false); 351 self:setflags(false, false);
352 self:setwritetimeout(false); 352 self:setwritetimeout(false);
353 self:setreadtimeout(false); 353 self:setreadtimeout(false);
354 self.onreadable = noop;
355 self.onwriteable = noop;
356 self.destroy = noop;
357 self.close = noop;
358 self.on = noop;
354 fds[self:getfd()] = nil; 359 fds[self:getfd()] = nil;
355 return self.conn:close(); 360 self.conn:close();
361 self.conn = nil;
356 end 362 end
357 363
358 function interface:ssl() 364 function interface:ssl()
359 return self._tls; 365 return self._tls;
360 end 366 end