# HG changeset patch # User Kim Alvefur # Date 1626181130 -7200 # Node ID 98bcc19361db002d1a9cf4b4b5adc7cb5674b7a2 # Parent 993462e5e4d407a9bb77192cce70535843ba4df5 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. diff -r 993462e5e4d4 -r 98bcc19361db net/server_epoll.lua --- 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);