Software /
code /
prosody
Diff
net/server_select.lua @ 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 |
parent | 5957:3c5061d937dd |
child | 5960:2a6edd4678c5 |
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