class Excon::Socket
def write_block(data)
def write_block(data) @socket.write(data) rescue OpenSSL::SSL::SSLError, Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitWritable => error if error.is_a?(OpenSSL::SSL::SSLError) && error.message != 'write would block' raise error else select_with_timeout(@socket, :write) && retry end end