lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_manager.rb in ably-rest-1.0.5 vs lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_manager.rb in ably-rest-1.0.6
- old
+ new
@@ -96,11 +96,11 @@
# @param [Hash] options
# @option options [Boolean] :immediately
def fail_messages_awaiting_ack(error, options = {})
immediately = options[:immediately] || false
- fail_proc = Proc.new do
+ fail_proc = lambda do
error = Ably::Exceptions::MessageDeliveryFailed.new("Continuity of connection was lost so published messages awaiting ACK have failed") unless error
fail_messages_in_queue connection.__pending_message_ack_queue__, error
end
# Allow a short time for other queued operations to complete before failing all messages
@@ -222,10 +222,10 @@
channel.once_state_changed do
@pending_state_change_timer.cancel if @pending_state_change_timer
@pending_state_change_timer = nil
end
- resend_if_disconnected_and_connected = Proc.new do
+ resend_if_disconnected_and_connected = lambda do
connection.unsafe_once(:disconnected) do
next unless pending_state_change_timer
connection.unsafe_once(:connected) do
next unless pending_state_change_timer
connection.send_protocol_message(