diff --git a/lib/http/timeout/null.rb b/lib/http/timeout/null.rb index bea83839..4628c4c7 100644 --- a/lib/http/timeout/null.rb +++ b/lib/http/timeout/null.rb @@ -36,7 +36,7 @@ def start_tls(host, ssl_socket_class, ssl_context) connect_ssl return unless ssl_context.verify_mode == OpenSSL::SSL::VERIFY_PEER - return unless ssl_context.respond_to?(:verify_hostname) && ssl_context.verify_hostname + return if ssl_context.respond_to?(:verify_hostname) && !ssl_context.verify_hostname @socket.post_connection_check(host) end