Software /
code /
prosody
Comparison
net/server_epoll.lua @ 11677:98bcc19361db
net.server_epoll: Call onconnect immediately after TLS handshake completion
Skips a roundtrip through the main loop in case client-first data is
available already, if not then :onreadable() will set the appropriate
timeout.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 13 Jul 2021 14:58:50 +0200 |
parent | 11676:993462e5e4d4 |
child | 11685:247561bf6fca |
comparison
equal
deleted
inserted
replaced
11676:993462e5e4d4 | 11677:98bcc19361db |
---|---|
633 self:debug("TLS handshake complete"); | 633 self:debug("TLS handshake complete"); |
634 end | 634 end |
635 self.onwritable = nil; | 635 self.onwritable = nil; |
636 self.onreadable = nil; | 636 self.onreadable = nil; |
637 self:on("status", "ssl-handshake-complete"); | 637 self:on("status", "ssl-handshake-complete"); |
638 self:setwritetimeout(); | |
639 self:set(true, true); | 638 self:set(true, true); |
639 self:onconnect(); | |
640 self:onreadable(); | |
640 elseif err == "wantread" then | 641 elseif err == "wantread" then |
641 self:noise("TLS handshake to wait until readable"); | 642 self:noise("TLS handshake to wait until readable"); |
642 self:set(true, false); | 643 self:set(true, false); |
643 self:setreadtimeout(cfg.ssl_handshake_timeout); | 644 self:setreadtimeout(cfg.ssl_handshake_timeout); |
644 elseif err == "wantwrite" then | 645 elseif err == "wantwrite" then |