lib/ably/realtime/client/outgoing_message_dispatcher.rb in ably-0.7.2 vs lib/ably/realtime/client/outgoing_message_dispatcher.rb in ably-0.7.4

- old
+ new

@@ -29,12 +29,12 @@ def outgoing_queue connection.__outgoing_message_queue__ end - def pending_queue - connection.__pending_message_queue__ + def pending_ack_queue + connection.__pending_message_ack_queue__ end def current_transport_outgoing_message_bus connection.transport.__outgoing_protocol_msgbus__ end @@ -45,11 +45,11 @@ non_blocking_loop_while(condition) do protocol_message = outgoing_queue.shift current_transport_outgoing_message_bus.publish :protocol_message, protocol_message if protocol_message.ack_required? - pending_queue << protocol_message + pending_ack_queue << protocol_message else protocol_message.succeed protocol_message end end end @@ -59,10 +59,10 @@ deliver_queued_protocol_messages end end def setup_event_handlers - connection.on(:connected) do + connection.unsafe_on(:connected) do deliver_queued_protocol_messages end end end end