aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrhenium <re4k@re4k.info>2013-05-11 09:24:54 +0900
committerrhenium <re4k@re4k.info>2013-05-11 09:24:54 +0900
commit16498094d4b019a3b8240de1c0a2d31ac101136f (patch)
treeb4c18f482617b02a0bb853fcaa9b166217c18179
parent73fc0f1c0fbcc71743df2b8fba3c155986cf4cf9 (diff)
downloadaclog-16498094d4b019a3b8240de1c0a2d31ac101136f.tar.gz
update collector: add logging when unauthorized
-rw-r--r--collector/stream.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/collector/stream.rb b/collector/stream.rb
index 5220471..d6e8267 100644
--- a/collector/stream.rb
+++ b/collector/stream.rb
@@ -30,9 +30,11 @@ module Aclog
@client.on_reconnect {|timeout, retries|
log(:warn, "Reconnected", retries) }
@client.on_max_reconnects {|timeout, retries|
+ @client.connection.stop
log(:warn, "Reached max reconnects", retries) }
@client.on_unauthorized {
log(:warn, "Unauthorized")
+ @client.connection.stop
@callback.call(type: "unauthorized", user_id: @user_id, id: @account_id) }
@client.each do |chunk|