Method: Ably::Realtime::Connection::ConnectionManager#fail

Defined in:
lib/ably/realtime/connection/connection_manager.rb

#fail(error) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Connection has failed



144
145
146
147
148
# File 'lib/ably/realtime/connection/connection_manager.rb', line 144

def fail(error)
  connection.logger.fatal "ConnectionManager: Connection failed - #{error}"
  connection.manager.destroy_transport
  connection.unsafe_once(:failed) { connection.emit :error, error }
end