Adding # of feeds to disconnect message.

This commit is contained in:
Samuel Clay 2013-04-08 10:20:51 -07:00
parent 046bc9888c
commit 2109592224
2 changed files with 3 additions and 3 deletions

View file

@ -56,6 +56,6 @@ io.sockets.on 'connection', (socket) ->
socket.on 'disconnect', () ->
socket.subscribe?.end()
console.log " ---> [#{@username}] Disconnect (#{@feeds.length} feeds), there are now" +
console.log " ---> [#{@username}] Disconnect (#{@feeds?.length} feeds), there are now" +
" #{io.sockets.clients().length-1} users. " +
" #{if SECURE then "(SSL)" else "(non-SSL)"}"

View file

@ -59,11 +59,11 @@
});
});
return socket.on('disconnect', function() {
var _ref;
var _ref, _ref1;
if ((_ref = socket.subscribe) != null) {
_ref.end();
}
return console.log((" ---> [" + this.username + "] Disconnect (" + this.feeds.length + " feeds), there are now") + (" " + (io.sockets.clients().length - 1) + " users. ") + (" " + (SECURE ? "(SSL)" : "(non-SSL)")));
return console.log((" ---> [" + this.username + "] Disconnect (" + ((_ref1 = this.feeds) != null ? _ref1.length : void 0) + " feeds), there are now") + (" " + (io.sockets.clients().length - 1) + " users. ") + (" " + (SECURE ? "(SSL)" : "(non-SSL)")));
});
});