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
373 373
  # Note that one reason that write_nonblock reads from the underlying IO
374 374
  # is when the peer requests a new TLS/SSL handshake.  See the openssl FAQ
375 375
  # for more details.  http://www.openssl.org/support/faq.html
376
  #
377
  # By specifying `exception: false`, the options hash allows you to indicate
378
  # that write_nonblock should not raise an IO::Wait*able exception, but
379
  # return the symbol :wait_writable or :wait_readable instead.
380
  #
381
  # WARNING: Retrying a write_nonblock after a previous IO::Wait*able,
382
  # or returned :wait_*able must be done with the exact, unmodified
383
  # +str+ object which triggered the IO::Wait*able exception or
384
  # :wait_*able return value.  Using a duplicate but otherwise identical
385
  # object will trigger an OpenSSL::SSL::SSLError exception.
386
  # This is a limitation of the underlying SSL_write(3SSL) function
387
  # provided by the OpenSSL library.
376 388

  
377 389
  def write_nonblock(s, exception: true)
378 390
    flush
379
-