Comparison

net/server_select.lua @ 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
parent 6055:596539a30e9b
child 6316:e144a1b67c30
comparison
equal deleted inserted replaced
6285:ea60d0441df7 6286:ec6e8d5a3fd3
964 if err then 964 if err then
965 return nil, err 965 return nil, err
966 end 966 end
967 client:settimeout( 0 ) 967 client:settimeout( 0 )
968 local ok, err = client:connect( address, port ) 968 local ok, err = client:connect( address, port )
969 if ok or err == "timeout" then 969 if ok or err == "timeout" or err == "Operation already in progress" then
970 return wrapclient( client, address, port, listeners, pattern, sslctx ) 970 return wrapclient( client, address, port, listeners, pattern, sslctx )
971 else 971 else
972 return nil, err 972 return nil, err
973 end 973 end
974 end 974 end