lib/ably/realtime/connection/connection_state_machine.rb in ably-0.8.1 vs lib/ably/realtime/connection/connection_state_machine.rb in ably-0.8.2
- old
+ new
@@ -46,10 +46,10 @@
after_transition(to: [:connected]) do |connection, current_transition|
protocol_message = current_transition.metadata
if is_error_type?(protocol_message.error)
connection.logger.warn "ConnectionManager: Connected with error - #{protocol_message.error.message}"
- connection.trigger :error, protocol_message.error
+ connection.emit :error, protocol_message.error
end
end
after_transition(to: [:disconnected, :suspended], from: [:connecting]) do |connection, current_transition|
connection.manager.respond_to_transport_disconnected_when_connecting current_transition