aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-18 17:15:32 +0200
committerKim Alvefur <zash@zash.se>2016-08-18 17:15:32 +0200
commit8182ccc0d0a88f4d68eaeb6239cb1b06a72a1958 (patch)
tree5f1eb7ad8219d3fa368fb3f93078360eb2ea0633 /net
parent17b9cdbbedf3d1a99581574c3834e7827356d69c (diff)
downloadprosody-8182ccc0d0a88f4d68eaeb6239cb1b06a72a1958.tar.gz
prosody-8182ccc0d0a88f4d68eaeb6239cb1b06a72a1958.zip
net.server_epoll: Trigger onconnect for TLS connections when writable after handshake
Diffstat (limited to 'net')
-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