Software /
code /
prosody
Diff
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 |
line wrap: on
line diff
--- a/net/server_epoll.lua Tue Jul 13 14:55:21 2021 +0200 +++ b/net/server_epoll.lua Tue Jul 13 14:58:50 2021 +0200 @@ -635,8 +635,9 @@ self.onwritable = nil; self.onreadable = nil; self:on("status", "ssl-handshake-complete"); - self:setwritetimeout(); self:set(true, true); + self:onconnect(); + self:onreadable(); elseif err == "wantread" then self:noise("TLS handshake to wait until readable"); self:set(true, false);