even more jshint compliance

This commit is contained in:
ansuz
2016-02-15 16:47:53 +01:00
parent 3cb94b8d80
commit 278c4ab32f
7 changed files with 21 additions and 4 deletions

View File

@@ -14,7 +14,9 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var WebSocket = require('ws');
// triggers jsh because we're not in a browser and WebSocket is a thing
var WebSocket = require('ws'); // jshint ignore:line
var REGISTER = 0;
var REGISTER_ACK = 1;
@@ -60,7 +62,7 @@ var sendChannelMessage = function (ctx, channel, msg, cb) {
try { user.socket.close(); } catch (e) { }
}
});
cb && cb();
if (cb) { cb(); }
});
};
@@ -184,7 +186,7 @@ var create = module.exports.create = function (socketServer, store) {
}
});
socket.on('close', function (evt) {
for (client in ctx.registeredClients) {
for (var client in ctx.registeredClients) {
if (ctx.registeredClients[client].socket === socket) {
dropClient(ctx, client);
}