aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/server_epoll.lua5
1 files changed, 4 insertions, 1 deletions
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