aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_event.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/server_event.lua')
-rw-r--r--net/server_event.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/server_event.lua b/net/server_event.lua
index fa6dda19..a4cf1146 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -758,18 +758,18 @@ do
local create = socket[typ or "tcp"]
if type( create ) ~= "function" then
return nil, "invalid socket type"
- end
+ end
local client, err = create() -- creating new socket
if not client then
debug( "cannot create socket:", err )
- return nil, err
- end
+ return nil, err
+ end
client:settimeout( 0 ) -- set nonblocking
local res, err = client:connect( addr, serverport ) -- connect
if res or ( err == "timeout" or err == "Operation already in progress" ) then
if client.getsockname then
addr = client:getsockname( )
- end
+ end
local interface = wrapclient( client, addr, serverport, listener, pattern, sslctx )
debug( "new connection id:", interface.id )
return interface, err