diff options
Diffstat (limited to 'collector')
-rw-r--r-- | collector/connection.rb | 7 | ||||
-rw-r--r-- | collector/stream.rb | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/collector/connection.rb b/collector/connection.rb index 8a06b3f..c2b2cde 100644 --- a/collector/connection.rb +++ b/collector/connection.rb @@ -59,6 +59,13 @@ module Aclog else @clients[account_id].update(msg) end + when "stop" + account_id = msg["id"] + if @clients[account_id] + @clients[account_id].stop + @clients.delete(account_id) + @logger.info("Received account stop") + end else @logger.info("Unknown message: #{msg}") end diff --git a/collector/stream.rb b/collector/stream.rb index 0fda622..e2bcf05 100644 --- a/collector/stream.rb +++ b/collector/stream.rb @@ -102,6 +102,7 @@ module Aclog def stop @client.connection.stop + log(:info, "Disconnected") end private |