Sha256: 9f3334a941aa09267a547badb0620c7d8ca539d1f3422b46f75bbe9ec6df536e

Contents?: true

Size: 517 Bytes

Versions: 2

Compression:

Stored size: 517 Bytes

Contents

# frozen_string_literal: true

require 'openssl'

module OpenSSL
  module SSL
    class SSLServer
      unless public_method_defined? :accept_nonblock
        def accept_nonblock
          sock = @svr.accept_nonblock

          begin
            ssl = OpenSSL::SSL::SSLSocket.new(sock, @ctx)
            ssl.sync_close = true
            ssl.accept if @start_immediately
            ssl
          rescue SSLError => ex
            sock.close
            raise ex
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puma-4.1.0-java lib/puma/accept_nonblock.rb
puma-4.1.0 lib/puma/accept_nonblock.rb