lib/bunny/cruby/ssl_socket.rb in bunny-2.0.0.rc1 vs lib/bunny/cruby/ssl_socket.rb in bunny-2.0.0.rc2

- old
+ new

@@ -6,16 +6,11 @@ # TLS-enabled TCP socket that implements convenience # methods found in Bunny::Socket. class SSLSocket < OpenSSL::SSL::SSLSocket - # IO::WaitReadable is 1.9+ only - READ_RETRY_EXCEPTION_CLASSES = [Errno::EAGAIN, Errno::EWOULDBLOCK] - READ_RETRY_EXCEPTION_CLASSES << IO::WaitReadable if IO.const_defined?(:WaitReadable) - - # IO::WaitWritable is 1.9+ only - WRITE_RETRY_EXCEPTION_CLASSES = [Errno::EAGAIN, Errno::EWOULDBLOCK] - WRITE_RETRY_EXCEPTION_CLASSES << IO::WaitWritable if IO.const_defined?(:WaitWritable) + READ_RETRY_EXCEPTION_CLASSES = [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable] + WRITE_RETRY_EXCEPTION_CLASSES = [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitWritable] # Reads given number of bytes with an optional timeout # # @param [Integer] count How many bytes to read # @param [Integer] timeout Timeout