From aadba26891e81e7fbabf0a56991b4309efc18d6c Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 10 Sep 2013 16:45:43 -0500 Subject: [PATCH] Fix disabling ssl causing errors --- changelog | 3 +++ lib/channel.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index f0b48f48..27fcdb1d 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +Tue Sep 10 16:45 2013 CDT + * lib/channel.js: Don't attempt to emit to SSL sockets if it's disabled + Tue Sep 10 16:34 2013 CDT * www/channel.html, www/assets/js/jwplayer.js: Cache jwplayer script locally since their server doesn't support SSL diff --git a/lib/channel.js b/lib/channel.js index b830abf1..ce0c1ea1 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -989,7 +989,8 @@ Channel.prototype.sendAll = function(message, data) { if(this.name == "") return; this.server.io.sockets.in(this.name).emit(message, data); - this.server.sslio.sockets.in(this.name).emit(message, data); + if (this.server.cfg["enable-ssl"]) + this.server.sslio.sockets.in(this.name).emit(message, data); } Channel.prototype.sendAllWithPermission = function(perm, msg, data) {