Skip to content
This repository has been archived by the owner on Oct 13, 2018. It is now read-only.

Commit

Permalink
fix(connections): Nothing listed under "Current Connections" fixes #37
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Sep 14, 2016
1 parent b4b77cb commit 00af3da
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/plugins/connections/lib/connections.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ module.exports.init = function (ui, bs) {

var int = setInterval(function () {

if (ui.clients.sockets.length) {
temp = Immutable.List(ui.clients.sockets.map(function (client) {
var sockets = ui.clients.sockets;
var keys = Object.keys(sockets);

if (keys.length) {
temp = Immutable.List(keys.map(function (clientKey) {
var currentClient = sockets[clientKey];
return Immutable.fromJS({
id: client.id,
browser: uaParser.setUA(client.handshake.headers["user-agent"]).getBrowser()
id: currentClient.id,
browser: uaParser.setUA(currentClient.handshake.headers["user-agent"]).getBrowser()
});
}));
if (!registry) {
Expand Down

0 comments on commit 00af3da

Please sign in to comment.