aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-18 17:04:57 +0200
committerKim Alvefur <zash@zash.se>2016-08-18 17:04:57 +0200
commit86989d47bc2aacd7889dbb8d93c31486177238e2 (patch)
treee237addd457aeebd70add06895dea0e8a72120a0
parenta0d0705978f38a612eb43d364b7fa5289810604c (diff)
downloadprosody-86989d47bc2aacd7889dbb8d93c31486177238e2.tar.gz
prosody-86989d47bc2aacd7889dbb8d93c31486177238e2.zip
net.server_epoll: Connect async in addclient
-rw-r--r--net/server_epoll.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 57911db1..89ac4f4d 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -529,9 +529,10 @@ local function wrapclient(conn, addr, port, listeners, pattern, tls)
end
local function addclient(addr, port, listeners, pattern, tls)
- local conn, err = socket.connect(addr, port);
+ local conn, err = socket.tcp();
if not conn then return conn, err; end
conn:settimeout(0);
+ conn:connect(addr, port);
local client = wrapclient(conn, addr, port, listeners, pattern, tls);
if tls then
client._tls = false;