Fixes #4223 on Windows by catching the specific exception class

git-svn-id: file:///home/svn/framework3/trunk@12450 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2011-04-27 00:20:32 +00:00
parent dbf2f5a4af
commit 8ba356271f
1 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ module Stream
rescue ::Exception => e
# This allows non-existent class names to be used in the rescue filter
case e.class.to_s
when 'Errno::EAGAIN', 'IO::WaitWritable'
when 'Errno::EAGAIN', 'Errno::EWOULDBLOCK', 'IO::WaitWritable'
# Sleep for a half a second, or until we can write again
Rex::ThreadSafe.select( nil, [ fd ], nil, 0.5 )
# Decrement the block size to handle full sendQs better
@ -74,7 +74,7 @@ module Stream
rescue ::Exception => e
# This allows non-existent class names to be used in the rescue filter
case e.class.to_s
when 'Errno::EAGAIN', 'IO::WaitReadable'
when 'Errno::EAGAIN', 'Errno::EWOULDBLOCK', 'IO::WaitReadable'
# Sleep for a half a second, or until we can read again
Rex::ThreadSafe.select( [ fd ], nil, nil, 0.5 )
# Decrement the block size to handle full sendQs better