lib/scamp/channels.rb in scamp-0.0.3 vs lib/scamp/channels.rb in scamp-0.0.4

- old
+ new

@@ -98,10 +98,10 @@ url = "https://streaming.campfirenow.com/room/#{channel_id}/live.json" # Timeout per https://github.com/igrigorik/em-http-request/wiki/Redirects-and-Timeouts http = EventMachine::HttpRequest.new(url, :connect_timeout => 20, :inactivity_timeout => 0).get :head => {'authorization' => [api_key, 'X']} http.errback { logger.error "Couldn't stream channel #{channel_id} at url #{url}" } - http.callback { logger.error "Disconnected from #{url}" } + http.callback { logger.error "Disconnected from #{url}"; channels_to_join << channel_id} http.stream {|chunk| json_parser << chunk } end def channel_id_from_channel_name(channel_name) logger.debug "Looking for channel id for #{channel_name}"