From 8ba356271ff779e4de2281d1d5b86eca3297d42e Mon Sep 17 00:00:00 2001 From: HD Moore Date: Wed, 27 Apr 2011 00:20:32 +0000 Subject: [PATCH] Fixes #4223 on Windows by catching the specific exception class git-svn-id: file:///home/svn/framework3/trunk@12450 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/io/stream.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rex/io/stream.rb b/lib/rex/io/stream.rb index 3bb7551dca..ec0b134b48 100644 --- a/lib/rex/io/stream.rb +++ b/lib/rex/io/stream.rb @@ -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