From 8182ccc0d0a88f4d68eaeb6239cb1b06a72a1958 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 18 Aug 2016 17:15:32 +0200 Subject: net.server_epoll: Trigger onconnect for TLS connections when writable after handshake --- net/server_epoll.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net') diff --git a/net/server_epoll.lua b/net/server_epoll.lua index c4ae7133..708d4ba5 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -404,8 +404,11 @@ function interface:tlshandskake() self._tls = true; self.starttls = false; if old == false then - self:on("connect"); + self.onwriteable = interface.onconnect; + self:setflags(false, true); + self:setwritetimeout(); else + self:setflags(true, true); self:on("status", "ssl-handshake-complete"); end elseif err == "wantread" then -- cgit v1.2.3