lib/amqp/client/connection.rb in amqp-client-0.2.1 vs lib/amqp/client/connection.rb in amqp-client-0.2.2
- old
+ new
@@ -13,10 +13,10 @@
def self.connect(uri, **options)
read_loop_thread = options[:read_loop_thread] || true
uri = URI.parse(uri)
tls = uri.scheme == "amqps"
- port = port_from_env || uri.port || (@tls ? 5671 : 5672)
+ port = port_from_env || uri.port || (tls ? 5671 : 5672)
host = uri.host || "localhost"
user = uri.user || "guest"
password = uri.password || "guest"
vhost = URI.decode_www_form_component(uri.path[1..-1] || "/")
options = URI.decode_www_form(uri.query || "").map! { |k, v| [k.to_sym, v] }.to_h.merge(options)