aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-13 14:58:50 +0200
committerKim Alvefur <zash@zash.se>2021-07-13 14:58:50 +0200
commit357cf7647a4e3c98cab0046e8342e23501e278f4 (patch)
treebfcc43e352bc243205689ee8f2ed82f2ba6f5a53 /net/server_epoll.lua
parent1877068b3d5962a3b00868203fcc579104065e59 (diff)
downloadprosody-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.
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua3
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);