Fix makefile and test_socket_error.lua
This commit is contained in:
parent
b34386ca5c
commit
7cad902bb7
3 changed files with 12 additions and 4 deletions
|
@ -14,8 +14,12 @@ assert('timeout' == err)
|
|||
for i = 1, 10 do
|
||||
-- select pass even if socket has error
|
||||
local _, rec, err = socket.select(nil, {sock}, 1)
|
||||
assert('timeout' == err)
|
||||
assert(not next(rec))
|
||||
local _, ss = next(rec)
|
||||
if ss then
|
||||
assert(ss == sock)
|
||||
else
|
||||
assert('timeout' == err, 'unexpected error :' .. tostring(err))
|
||||
end
|
||||
err = sock:getoption("error") -- i get 'connection refused' on WinXP
|
||||
if err then
|
||||
print("Passed! Error is '" .. err .. "'.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue