aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
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
commit95a30beb0ef1ca2cb3aa29bbf2060b4e2e693ff4 (patch)
treee237addd457aeebd70add06895dea0e8a72120a0 /net/server_epoll.lua
parent19db7cfbc7075c3a5e3a1c9971cd53a20452e820 (diff)
downloadprosody-95a30beb0ef1ca2cb3aa29bbf2060b4e2e693ff4.tar.gz
prosody-95a30beb0ef1ca2cb3aa29bbf2060b4e2e693ff4.zip
net.server_epoll: Connect async in addclient
Diffstat (limited to 'net/server_epoll.lua')
-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;