Sha256: 2954a0d7eb022f517a280669a50ee19d30c00d7fdbb3811030978acba96ccec7

Contents?: true

Size: 595 Bytes

Versions: 45

Compression:

Stored size: 595 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
            if ssl
              ssl.close
            else
              sock.close
            end
            raise ex
          end
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 3 rubygems

Version Path
puma-4.2.1 lib/puma/accept_nonblock.rb
puma-4.2.0-java lib/puma/accept_nonblock.rb
puma-4.2.0 lib/puma/accept_nonblock.rb
puma-4.1.1-java lib/puma/accept_nonblock.rb
puma-4.1.1 lib/puma/accept_nonblock.rb