Remove JRuby-specifiy SocketPoller#listening?
The related issue in JRuby has been fixed and is available since 9.2.8.0
@@ -65,16 +65,6 @@ module Selenium
arr << Errno::EALREADY if Platform.wsl?
}.freeze
- if Platform.jruby?
- # we use a plain TCPSocket here since JRuby has issues closing socket
- # see https://github.com/jruby/jruby/issues/5709
- def listening?
- TCPSocket.new(@host, @port).close
- true
- rescue *NOT_CONNECTED_ERRORS
- false
- end
- else
def listening?
addr = Socket.getaddrinfo(@host, @port, Socket::AF_INET, Socket::SOCK_STREAM)
sock = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
@@ -96,7 +86,6 @@ module Selenium
WebDriver.logger.debug("polling for socket on #{[@host, @port].inspect}")
false
end
- end
def socket_writable?(sock)
IO.select(nil, [sock], nil, CONNECT_TIMEOUT)
