diff options
author | Kim Alvefur <zash@zash.se> | 2015-08-20 13:05:22 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-08-20 13:05:22 +0200 |
commit | 80c7d5155e9c468d86f3b268e90303decd7d1827 (patch) | |
tree | 103fd7d9396b60b9f76071a009c54d3ca9d35744 /net/server_event.lua | |
parent | f1313996a2db339fe76f269353cc911c68316f30 (diff) | |
parent | c5e4af96d8bd9de7a96d3dc1eff5b8d1eecbfdaf (diff) | |
download | prosody-80c7d5155e9c468d86f3b268e90303decd7d1827.tar.gz prosody-80c7d5155e9c468d86f3b268e90303decd7d1827.zip |
Merge 0.10->trunk
Diffstat (limited to 'net/server_event.lua')
-rw-r--r-- | net/server_event.lua | 8 |
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 |