Software /
code /
prosody
Changeset
6813:b1615fa62e59
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 | 6812:7af63377a1cf |
children | 6814:936f969bf783 |
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:51:27 2013 -0500 +++ b/net/server_select.lua Wed Dec 18 17:54:31 2013 -0500 @@ -948,11 +948,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