mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
* ext/socket/lib/socket.rb (Socket.accept_loop): rescue
IO::WaitReadable instead of Errno::EWOULDBLOCK. (Socket.udp_server_loop_on): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
828d7a368a
commit
3d57dfa01b
2 changed files with 8 additions and 2 deletions
|
@ -404,7 +404,7 @@ class Socket
|
|||
readable.each {|r|
|
||||
begin
|
||||
sock, addr = r.accept_nonblock
|
||||
rescue Errno::EWOULDBLOCK
|
||||
rescue IO::WaitReadable
|
||||
next
|
||||
end
|
||||
yield sock, addr
|
||||
|
@ -567,7 +567,7 @@ class Socket
|
|||
readable.each {|r|
|
||||
begin
|
||||
msg, sender_addrinfo, rflags, *controls = r.recvmsg_nonblock
|
||||
rescue Errno::EWOULDBLOCK
|
||||
rescue IO::WaitReadable
|
||||
next
|
||||
end
|
||||
ai = r.local_address
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue