# HG changeset patch # User daurnimator # Date 1403712900 14400 # Node ID ec6e8d5a3fd3618ec872d9bdba3d8db62c335fe9 # Parent ea60d0441df786f8fc4da0af16ef2cc0295e017a net/server_*: Fix addclient: LuaSocket 3.0-rc1 sometimes returns EALREADY instead of EINPROGRESS when the dns lookup has multiple results diff -r ea60d0441df7 -r ec6e8d5a3fd3 net/server_event.lua --- 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 diff -r ea60d0441df7 -r ec6e8d5a3fd3 net/server_select.lua --- 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