diff options
author | Kim Alvefur <zash@zash.se> | 2021-07-13 14:58:50 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-07-13 14:58:50 +0200 |
commit | 357cf7647a4e3c98cab0046e8342e23501e278f4 (patch) | |
tree | bfcc43e352bc243205689ee8f2ed82f2ba6f5a53 | |
parent | 1877068b3d5962a3b00868203fcc579104065e59 (diff) | |
download | prosody-357cf7647a4e3c98cab0046e8342e23501e278f4.tar.gz prosody-357cf7647a4e3c98cab0046e8342e23501e278f4.zip |
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.
-rw-r--r-- | net/server_epoll.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 2dfd44e8..f6a71379 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -635,8 +635,9 @@ function interface:tlshandshake() 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); |