Project

General

Profile

Feature #12085 » 0001-OpenSSL-SSL-SSLSocket-write_nonblock-expand-document.patch

normalperson (Eric Wong), 02/19/2016 02:02 AM

View differences:

ext/openssl/lib/openssl/buffering.rb
# Note that one reason that write_nonblock reads from the underlying IO
# is when the peer requests a new TLS/SSL handshake. See the openssl FAQ
# for more details. http://www.openssl.org/support/faq.html
#
# By specifying `exception: false`, the options hash allows you to indicate
# that write_nonblock should not raise an IO::Wait*able exception, but
# return the symbol :wait_writable or :wait_readable instead.
#
# WARNING: Retrying a write_nonblock after a previous IO::Wait*able,
# or returned :wait_*able must be done with the exact, unmodified
# +str+ object which triggered the IO::Wait*able exception or
# :wait_*able return value. Using a duplicate but otherwise identical
# object will trigger an OpenSSL::SSL::SSLError exception.
# This is a limitation of the underlying SSL_write(3SSL) function
# provided by the OpenSSL library.
def write_nonblock(s, exception: true)
flush
-
(1-1/2)