Comparison

net/server_epoll.lua @ 7595:166b2e0766a4

net.server_epoll: Return status from starttls method
author Kim Alvefur <zash@zash.se>
date Thu, 18 Aug 2016 16:48:16 +0200
parent 7594:5e884501a9ac
child 7596:2c4ba55b616c
comparison
equal deleted inserted replaced
7594:5e884501a9ac 7595:166b2e0766a4
375 self:setflags(false, false); 375 self:setflags(false, false);
376 local conn, err = luasec.wrap(self.conn, ctx or self.tls); 376 local conn, err = luasec.wrap(self.conn, ctx or self.tls);
377 if not conn then 377 if not conn then
378 self:on("disconnect", err); 378 self:on("disconnect", err);
379 self:destroy(); 379 self:destroy();
380 return conn, err;
380 end 381 end
381 conn:settimeout(0); 382 conn:settimeout(0);
382 self.conn = conn; 383 self.conn = conn;
383 self._starttls = nil; 384 self._starttls = nil;
384 self.onwriteable = interface.tlshandskake; 385 self.onwriteable = interface.tlshandskake;