Swap out exceptions
git-svn-id: file:///home/svn/framework3/trunk@12481 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
5758f2ab46
commit
96ac0fd51a
|
@ -133,7 +133,7 @@ class Client
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
ssl.accept_nonblock
|
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)
|
select(nil, nil, nil, 0.25)
|
||||||
retry
|
retry
|
||||||
end
|
end
|
||||||
|
|
|
@ -101,7 +101,7 @@ begin
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
self.sslsock.connect_nonblock
|
self.sslsock.connect_nonblock
|
||||||
rescue OpenSSL::SSL::ReadAgain, OpenSSL::SSL::WriteAgain
|
rescue ::OpenSSL::SSL::ReadAgain, ::OpenSSL::SSL::WriteAgain
|
||||||
select(nil, nil, nil, 0.10)
|
select(nil, nil, nil, 0.10)
|
||||||
retry
|
retry
|
||||||
end
|
end
|
||||||
|
@ -141,7 +141,7 @@ begin
|
||||||
total_sent += sent
|
total_sent += sent
|
||||||
end
|
end
|
||||||
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
|
# Sleep for a half a second, or until we can write again
|
||||||
Rex::ThreadSafe.select( nil, [ sslsock ], nil, 0.5 )
|
Rex::ThreadSafe.select( nil, [ sslsock ], nil, 0.5 )
|
||||||
# Decrement the block size to handle full sendQs better
|
# Decrement the block size to handle full sendQs better
|
||||||
|
@ -170,7 +170,7 @@ begin
|
||||||
|
|
||||||
begin
|
begin
|
||||||
return sslsock.read_nonblock( length )
|
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
|
# Sleep for a half a second, or until we can read again
|
||||||
Rex::ThreadSafe.select( [ fd ], nil, nil, 0.5 )
|
Rex::ThreadSafe.select( [ fd ], nil, nil, 0.5 )
|
||||||
retry
|
retry
|
||||||
|
|
|
@ -63,7 +63,7 @@ module Rex::Socket::SslTcpServer
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
ssl.accept_nonblock
|
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)
|
select(nil, nil, nil, 0.25)
|
||||||
retry
|
retry
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue