Software /
code /
prosody
Changeset
5959:9e3b15199ec5
net/server_select: addclient: Check for failure correctly; remove wrapconnection call on failure
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Wed, 18 Dec 2013 17:54:31 -0500 |
parents | 5958:451b4649fad2 |
children | 5960:2a6edd4678c5 |
files | net/server_select.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_select.lua Wed Dec 18 17:52:28 2013 -0500 +++ b/net/server_select.lua Wed Dec 18 17:54:31 2013 -0500 @@ -936,11 +936,11 @@ return nil, err end client:settimeout( 0 ) - _, err = client:connect( address, port ) - if err then -- try again + local ok, err = client:connect( address, port ) + if ok or err == "timeout" then return wrapclient( client, address, port, listeners, pattern, sslctx ) else - return wrapconnection( nil, listeners, client, address, port, "clientport", pattern, sslctx ) + return nil, err end end