Comparison

net/server_epoll.lua @ 10847:42c8dce6e765

net.server_epoll: Fix typo in internal method name
author Kim Alvefur <zash@zash.se>
date Fri, 22 May 2020 15:36:03 +0200
parent 10846:d0b098d0f6c3
child 10854:472fe13a05f9
comparison
equal deleted inserted replaced
10846:d0b098d0f6c3 10847:42c8dce6e765
517 self:set(nil, true); -- make sure wantwrite is set 517 self:set(nil, true); -- make sure wantwrite is set
518 else 518 else
519 if self.ondrain == interface.starttls then 519 if self.ondrain == interface.starttls then
520 self.ondrain = nil; 520 self.ondrain = nil;
521 end 521 end
522 self.onwritable = interface.tlshandskake; 522 self.onwritable = interface.tlshandshake;
523 self.onreadable = interface.tlshandskake; 523 self.onreadable = interface.tlshandshake;
524 self:set(true, true); 524 self:set(true, true);
525 self:debug("Prepared to start TLS"); 525 self:debug("Prepared to start TLS");
526 end 526 end
527 end 527 end
528 528
529 function interface:tlshandskake() 529 function interface:tlshandshake()
530 self:setwritetimeout(false); 530 self:setwritetimeout(false);
531 self:setreadtimeout(false); 531 self:setreadtimeout(false);
532 if not self._tls then 532 if not self._tls then
533 self._tls = true; 533 self._tls = true;
534 self:debug("Starting TLS now"); 534 self:debug("Starting TLS now");
553 conn:sni(self._server.hosts, true); 553 conn:sni(self._server.hosts, true);
554 end 554 end
555 end 555 end
556 self:on("starttls"); 556 self:on("starttls");
557 self.ondrain = nil; 557 self.ondrain = nil;
558 self.onwritable = interface.tlshandskake; 558 self.onwritable = interface.tlshandshake;
559 self.onreadable = interface.tlshandskake; 559 self.onreadable = interface.tlshandshake;
560 return self:init(); 560 return self:init();
561 end 561 end
562 self:noise("Continuing TLS handshake"); 562 self:noise("Continuing TLS handshake");
563 local ok, err = self.conn:dohandshake(); 563 local ok, err = self.conn:dohandshake();
564 if ok then 564 if ok then