aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-14 22:06:24 +0200
committerKim Alvefur <zash@zash.se>2021-07-14 22:06:24 +0200
commit9b58be76c4fd28af6abaf5ee6e3df115bddba8a4 (patch)
treefc11c4e0c2ba1f80757b9e9a6cda4b51cde91f6f
parenta60da1f81d7faf717a122673e5cd1f2e3f42055b (diff)
downloadprosody-9b58be76c4fd28af6abaf5ee6e3df115bddba8a4.tar.gz
prosody-9b58be76c4fd28af6abaf5ee6e3df115bddba8a4.zip
net.server_epoll: Add an (empty) method for setting socket options
-rw-r--r--net/server_epoll.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 8c26b4e6..1da0791b 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -709,6 +709,7 @@ function interface:onacceptable()
end
local client = wrapsocket(conn, self, nil, self.listeners);
client:debug("New connection %s on server %s", client, self);
+ client:defaultoptions();
if self.tls_direct then
client:add(true, true);
client:inittls(self.tls_ctx, true);
@@ -722,9 +723,14 @@ end
-- Initialization for outgoing connections
function interface:init()
self:setwritetimeout(cfg.connect_timeout);
+ self:defaultoptions();
return self:add(true, true);
end
+-- luacheck: ignore 212/self
+function interface:defaultoptions()
+end
+
function interface:pause()
self:noise("Pause reading");
return self:set(false);