зеркало из https://github.com/github/ruby.git
Simply treat IO::WaitReadable just like Errno::EAGAIN
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0deee5c0aa
Коммит
34f3f916e6
|
@ -383,15 +383,9 @@ def assert_finish(timeout_seconds, testsrc, message = '')
|
||||||
end
|
end
|
||||||
if io.respond_to?(:read_nonblock)
|
if io.respond_to?(:read_nonblock)
|
||||||
if IO.select([io], nil, nil, diff)
|
if IO.select([io], nil, nil, diff)
|
||||||
tries = 0
|
|
||||||
begin
|
begin
|
||||||
io.read_nonblock(1024)
|
io.read_nonblock(1024)
|
||||||
rescue IO::WaitReadable
|
rescue Errno::EAGAIN, IO::WaitReadable, EOFError
|
||||||
IO.select([io])
|
|
||||||
tries += 1
|
|
||||||
break if tries > 3
|
|
||||||
retry
|
|
||||||
rescue Errno::EAGAIN, EOFError
|
|
||||||
break
|
break
|
||||||
end while true
|
end while true
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче