jruby: gave up and rw on connect, as we're entering an infinite loop too many times after ssl connect and waiting for writes. the problem is identified though, and will be worked on once we work on polling less

This commit is contained in:
HoneyryderChuck 2020-04-13 17:52:32 +01:00
parent 5595a6c79f
commit cf5be6b899
3 changed files with 12 additions and 4 deletions

View File

@ -20,6 +20,14 @@ module HTTPX
@state = :negotiated if @keep_open
end
def interests
@interests || super
end
def interests
:rw
end if RUBY_ENGINE == "jruby"
def protocol
@io.alpn_protocol || super
rescue StandardError

View File

@ -13,8 +13,6 @@ module HTTPX
attr_reader :state
attr_reader :interests
alias_method :host, :ip
def initialize(origin, addresses, options)
@ -24,7 +22,6 @@ module HTTPX
@options = Options.new(options)
@fallback_protocol = @options.fallback_protocol
@port = origin.port
@interests = :w
if @options.io
@io = case @options.io
when Hash
@ -46,6 +43,10 @@ module HTTPX
@io ||= build_socket
end
def interests
:w
end
def to_io
@io.to_io
end

View File

@ -15,7 +15,6 @@ module HTTPX
@options = Options.new(options)
@path = @options.transport_options[:path]
@fallback_protocol = @options.fallback_protocol
@interests = :w
if @options.io
@io = case @options.io
when Hash