From 95a30beb0ef1ca2cb3aa29bbf2060b4e2e693ff4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 18 Aug 2016 17:04:57 +0200 Subject: net.server_epoll: Connect async in addclient --- net/server_epoll.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3