diff options
author | Kim Alvefur <zash@zash.se> | 2021-07-13 14:51:05 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-07-13 14:51:05 +0200 |
commit | 123a7b70799c0ec3f773a7422e304ca4940b3ae3 (patch) | |
tree | 0e22025918d0505e2acd2696b815eca1dcc8a924 | |
parent | 063a7e45a32661ca192d4aa0d7321f998b240a15 (diff) | |
download | prosody-123a7b70799c0ec3f773a7422e304ca4940b3ae3.tar.gz prosody-123a7b70799c0ec3f773a7422e304ca4940b3ae3.zip |
net.server_epoll: Keep socket registered in epoll trough TLS wrapping
There's the theory that the socket isn't the same before/after wrap(),
but since epoll operates on FD numbers this shouldn't matter.
-rw-r--r-- | net/server_epoll.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index b89f6cb8..ce69abb1 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -575,7 +575,6 @@ function interface:inittls(tls_ctx) if tls_ctx then self.tls_ctx = tls_ctx; end self._tls = true; self:debug("Starting TLS now"); - self:del(); self:updatenames(); -- Can't getpeer/sockname after wrap() local ok, conn, err = pcall(luasec.wrap, self.conn, self.tls_ctx); if not ok then @@ -615,7 +614,7 @@ function interface:inittls(tls_ctx) self.onreadable = interface.tlshandshake; self:setreadtimeout(cfg.ssl_handshake_timeout); self:setwritetimeout(cfg.ssl_handshake_timeout); - self:add(true, true); + self:set(true, true); end function interface:tlshandshake() |