lib/ably/realtime/client/incoming_message_dispatcher.rb in ably-0.8.1 vs lib/ably/realtime/client/incoming_message_dispatcher.rb in ably-0.8.2

- old
+ new

@@ -47,11 +47,11 @@ get_channel(protocol_message.channel) else connection end error_message = "Protocol error, duplicate message received for serial #{protocol_message.connection_serial}" - error_target.trigger :error, Ably::Exceptions::ProtocolError.new(error_message, 400, 80013) + error_target.emit :error, Ably::Exceptions::ProtocolError.new(error_message, 400, 80013) logger.error error_message return end end @@ -115,10 +115,10 @@ channel.__incoming_msgbus__.publish :message, message end else error = Ably::Exceptions::ProtocolError.new("Protocol Message Action #{protocol_message.action} is unsupported by this MessageDispatcher", 400, 80013) - client.connection.trigger :error, error + client.connection.emit :error, error logger.fatal error.message end end def dispatch_channel_error(protocol_message)