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 | 95a30beb0ef1ca2cb3aa29bbf2060b4e2e693ff4 (patch) | |
tree | e237addd457aeebd70add06895dea0e8a72120a0 | |
parent | 19db7cfbc7075c3a5e3a1c9971cd53a20452e820 (diff) | |
download | prosody-95a30beb0ef1ca2cb3aa29bbf2060b4e2e693ff4.tar.gz prosody-95a30beb0ef1ca2cb3aa29bbf2060b4e2e693ff4.zip |
net.server_epoll: Connect async in addclient
-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; |