Server: Updated stats command to new client store
authorDarren <darren@darrenwhitlen.com>
Mon, 29 Oct 2012 20:21:03 +0000 (20:21 +0000)
committerDarren <darren@darrenwhitlen.com>
Mon, 29 Oct 2012 20:21:03 +0000 (20:21 +0000)
server/kiwi.js

index 1a4d3130e65baa8e2551b36f977545f43803e39c..e2f87581fa4e63021ac1edfe4480aa2d98f3e3a8 100755 (executable)
@@ -99,7 +99,7 @@ global.clients = {
 // Start up a weblistener for each found in the config
 _.each(config.get().servers, function (server) {
     var wl = new WebListener(server, config.get().transports);
-    
+
     wl.on('connection', function (client) {
         clients.add(client);
     });
@@ -140,7 +140,8 @@ process.stdin.on('data', function (buffered) {
 
     switch (data) {
         case 'stats':
-            console.log('Connected clients: ' + _.size(clients).toString());
+            console.log('Connected clients: ' + _.size(global.clients.clients).toString());
+            console.log('Num. remote hosts: ' + _.size(global.clients.addresses).toString());
             break;
 
         case 'reconfig':