# HG changeset patch # User Kim Alvefur # Date 1471533332 -7200 # Node ID a18532076efede41fd28e759156fe50b5ed8399c # Parent afbda0bd9cfc34a5d3143993b7d0d4907bf049a2 net.server_epoll: Trigger onconnect for TLS connections when writable after handshake diff -r afbda0bd9cfc -r a18532076efe net/server_epoll.lua --- a/net/server_epoll.lua Thu Aug 18 17:13:22 2016 +0200 +++ b/net/server_epoll.lua Thu Aug 18 17:15:32 2016 +0200 @@ -404,8 +404,11 @@ 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