Mercurial > prosody-modules
changeset 1451:d31ace5b1175
mod_statsd: Add missing `pairs` call
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Tue, 24 Jun 2014 12:16:44 -0400 |
parents | 5107278268ae |
children | 097c6af98d0a |
files | mod_statsd/mod_statsd.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_statsd/mod_statsd.lua Tue Jun 24 13:14:54 2014 +0700 +++ b/mod_statsd/mod_statsd.lua Tue Jun 24 12:16:44 2014 -0400 @@ -29,11 +29,11 @@ -- Track users as they bind/unbind -- count bare sessions every time, as we have no way to tell if it's a new bare session or not module:hook("resource-bind", function(event) - send(prefix.."bare_sessions:"..iterators.count(bare_sessions).."|g") + send(prefix.."bare_sessions:"..iterators.count(pairs(bare_sessions)).."|g") send(prefix.."full_sessions:+1|g") end, 1) module:hook("resource-unbind", function(event) - send(prefix.."bare_sessions:"..iterators.count(bare_sessions).."|g") + send(prefix.."bare_sessions:"..iterators.count(pairs(bare_sessions)).."|g") send(prefix.."full_sessions:-1|g") end, 1)