Software /
code /
prosody
Changeset
6286:ec6e8d5a3fd3
net/server_*: Fix addclient: LuaSocket 3.0-rc1 sometimes returns EALREADY instead of EINPROGRESS when the dns lookup has multiple results
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Wed, 25 Jun 2014 12:15:00 -0400 |
parents | 6285:ea60d0441df7 |
children | 6290:54e748acc07a |
files | net/server_event.lua net/server_select.lua |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_event.lua Sat Jun 21 15:05:52 2014 +0200 +++ b/net/server_event.lua Wed Jun 25 12:15:00 2014 -0400 @@ -761,7 +761,7 @@ end client:settimeout( 0 ) -- set nonblocking local res, err = client:connect( addr, serverport ) -- connect - if res or ( err == "timeout" ) then + if res or ( err == "timeout" or err == "Operation already in progress" ) then if client.getsockname then addr = client:getsockname( ) end
--- a/net/server_select.lua Sat Jun 21 15:05:52 2014 +0200 +++ b/net/server_select.lua Wed Jun 25 12:15:00 2014 -0400 @@ -966,7 +966,7 @@ end client:settimeout( 0 ) local ok, err = client:connect( address, port ) - if ok or err == "timeout" then + if ok or err == "timeout" or err == "Operation already in progress" then return wrapclient( client, address, port, listeners, pattern, sslctx ) else return nil, err