* 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
@ -1,3 +1,9 @@
|
|||||||
|
Sun Jul 19 10:54:56 2009 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* ext/socket/lib/socket.rb (Socket.accept_loop): rescue
|
||||||
|
IO::WaitReadable instead of Errno::EWOULDBLOCK.
|
||||||
|
(Socket.udp_server_loop_on): ditto.
|
||||||
|
|
||||||
Sat Jul 18 23:44:59 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
Sat Jul 18 23:44:59 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* re.c (reg_enc_error): use rb_enc_get to get the encoding of
|
* re.c (reg_enc_error): use rb_enc_get to get the encoding of
|
||||||
|
@ -404,7 +404,7 @@ class Socket
|
|||||||
readable.each {|r|
|
readable.each {|r|
|
||||||
begin
|
begin
|
||||||
sock, addr = r.accept_nonblock
|
sock, addr = r.accept_nonblock
|
||||||
rescue Errno::EWOULDBLOCK
|
rescue IO::WaitReadable
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
yield sock, addr
|
yield sock, addr
|
||||||
@ -567,7 +567,7 @@ class Socket
|
|||||||
readable.each {|r|
|
readable.each {|r|
|
||||||
begin
|
begin
|
||||||
msg, sender_addrinfo, rflags, *controls = r.recvmsg_nonblock
|
msg, sender_addrinfo, rflags, *controls = r.recvmsg_nonblock
|
||||||
rescue Errno::EWOULDBLOCK
|
rescue IO::WaitReadable
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
ai = r.local_address
|
ai = r.local_address
|
||||||
|
Loading…
x
Reference in New Issue
Block a user