net.server_epoll: Trigger onconnect for TLS connections when writable after handshake

This commit is contained in:
Kim Alvefur 2016-08-18 17:15:32 +02:00
parent 1a8fd7920f
commit f91a22024b

View file

@ -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