aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-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;