Swap out exceptions

git-svn-id: file:///home/svn/framework3/trunk@12481 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2011-04-30 08:47:32 +00:00
parent 5758f2ab46
commit 96ac0fd51a
3 changed files with 5 additions and 5 deletions

View File

@ -133,7 +133,7 @@ class Client
else
begin
ssl.accept_nonblock
rescue OpenSSL::SSL::ReadAgain, OpenSSL::SSL::WriteAgain
rescue ::OpenSSL::SSL::ReadAgain, ::OpenSSL::SSL::WriteAgain, ::OpenSSL::SSL::SSLError
select(nil, nil, nil, 0.25)
retry
end

View File

@ -101,7 +101,7 @@ begin
else
begin
self.sslsock.connect_nonblock
rescue OpenSSL::SSL::ReadAgain, OpenSSL::SSL::WriteAgain
rescue ::OpenSSL::SSL::ReadAgain, ::OpenSSL::SSL::WriteAgain
select(nil, nil, nil, 0.10)
retry
end
@ -141,7 +141,7 @@ begin
total_sent += sent
end
end
rescue ::Errno::EAGAIN, ::Errno::EWOULDBLOCK, ::IO::WaitWritable, ::IO::ReadWritable
rescue ::Errno::EAGAIN, ::Errno::EWOULDBLOCK, ::OpenSSL::SSL::ReadAgain, ::OpenSSL::SSL::WriteAgain
# Sleep for a half a second, or until we can write again
Rex::ThreadSafe.select( nil, [ sslsock ], nil, 0.5 )
# Decrement the block size to handle full sendQs better
@ -170,7 +170,7 @@ begin
begin
return sslsock.read_nonblock( length )
rescue ::Errno::EAGAIN, ::Errno::EWOULDBLOCK, ::IO::WaitWritable, ::IO::ReadWritable
rescue ::Errno::EAGAIN, ::Errno::EWOULDBLOCK, ::OpenSSL::SSL::ReadAgain, ::OpenSSL::SSL::WriteAgain
# Sleep for a half a second, or until we can read again
Rex::ThreadSafe.select( [ fd ], nil, nil, 0.5 )
retry

View File

@ -63,7 +63,7 @@ module Rex::Socket::SslTcpServer
else
begin
ssl.accept_nonblock
rescue OpenSSL::SSL::ReadAgain, OpenSSL::SSL::WriteAgain
rescue ::OpenSSL::SSL::ReadAgain, ::OpenSSL::SSL::WriteAgain, ::OpenSSL::SSL::SSLError
select(nil, nil, nil, 0.25)
retry
end