Software /
code /
prosody
Changeset
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 |
parents | 11676:993462e5e4d4 |
children | 11678:f90a337d81a8 |
files | net/server_epoll.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
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);