lib/bunny/session.rb in bunny-2.6.4 vs lib/bunny/session.rb in bunny-2.6.5
- old
+ new
@@ -185,11 +185,12 @@
@client_channel_max = normalize_client_channel_max(opts.fetch(:channel_max, DEFAULT_CHANNEL_MAX))
# will be-renegotiated during connection tuning steps. MK.
@channel_max = @client_channel_max
@client_heartbeat = self.heartbeat_from(opts)
- @client_properties = DEFAULT_CLIENT_PROPERTIES.merge(opts.fetch(:properties, {}))
+ client_props = opts[:properties] || opts[:client_properties] || {}
+ @client_properties = DEFAULT_CLIENT_PROPERTIES.merge(client_props)
@mechanism = opts.fetch(:auth_mechanism, "PLAIN")
@credentials_encoder = credentials_encoder_for(@mechanism)
@locale = @opts.fetch(:locale, DEFAULT_LOCALE)
@mutex_impl = @opts.fetch(:mutex_impl, Monitor)
@@ -815,11 +816,11 @@
def clean_up_on_shutdown
begin
shut_down_all_consumer_work_pools!
maybe_shutdown_reader_loop
maybe_shutdown_heartbeat_sender
- rescue ShutdownSignal => sse
+ rescue ShutdownSignal => _sse
# no-op
rescue Exception => e
@logger.warn "Caught an exception when cleaning up after receiving connection.close: #{e.message}"
ensure
close_transport
@@ -1206,10 +1207,10 @@
if connection_open_ok.is_a?(AMQ::Protocol::Connection::Close)
e = instantiate_connection_level_exception(connection_open_ok)
begin
shut_down_all_consumer_work_pools!
maybe_shutdown_reader_loop
- rescue ShutdownSignal => sse
+ rescue ShutdownSignal => _sse
# no-op
rescue Exception => e
@logger.warn "Caught an exception when cleaning up after receiving connection.close: #{e.message}"
ensure
close_transport