lib/bunny/session.rb in bunny-2.14.4 vs lib/bunny/session.rb in bunny-2.15.0
- old
+ new
@@ -340,10 +340,18 @@
@status_mutex.synchronize { @manually_closed = false }
self
end
+ def update_secret(value, reason)
+ @transport.send_frame(AMQ::Protocol::Connection::UpdateSecret.encode(value, reason))
+ @last_update_secret_ok = wait_on_continuations
+ raise_if_continuation_resulted_in_a_connection_error!
+
+ @last_update_secret_ok
+ end
+
# Socket operation write timeout used by this connection
# @return [Integer]
# @private
def transport_write_timeout
@transport.write_timeout
@@ -630,9 +638,11 @@
@blocked = true
@block_callback.call(method) if @block_callback
when AMQ::Protocol::Connection::Unblocked then
@blocked = false
@unblock_callback.call(method) if @unblock_callback
+ when AMQ::Protocol::Connection::UpdateSecretOk then
+ @continuations.push(method)
when AMQ::Protocol::Channel::Close then
begin
ch = synchronised_find_channel(ch_number)
# this includes sending a channel.close-ok and
# potentially invoking a user-provided callback,