diff options
author | Kim Alvefur <zash@zash.se> | 2016-08-18 17:04:57 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-08-18 17:04:57 +0200 |
commit | 86989d47bc2aacd7889dbb8d93c31486177238e2 (patch) | |
tree | e237addd457aeebd70add06895dea0e8a72120a0 /net/server_epoll.lua | |
parent | a0d0705978f38a612eb43d364b7fa5289810604c (diff) | |
download | prosody-86989d47bc2aacd7889dbb8d93c31486177238e2.tar.gz prosody-86989d47bc2aacd7889dbb8d93c31486177238e2.zip |
net.server_epoll: Connect async in addclient
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r-- | net/server_epoll.lua | 3 |
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; |