1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-13 01:20:54 +00:00

Fix issue where a new WebSocket() call can crash the script if it fails. Fix positioning of theater mode status and action overlay.

This commit is contained in:
SirStendec 2015-01-27 17:05:51 -05:00
parent d6619af92e
commit c9bd39de8a
6 changed files with 49 additions and 16 deletions

View file

@ -11,13 +11,20 @@ FFZ.ws_commands = {};
// ----------------
FFZ.prototype.ws_create = function() {
var f = this;
var f = this, ws;
this._ws_last_req = 0;
this._ws_callbacks = {};
this._ws_pending = this._ws_pending || [];
var ws = this._ws_sock = new WebSocket("ws://ffz.stendec.me/");
try {
ws = this._ws_sock = new WebSocket("ws://ffz.stendec.me/");
} catch(err) {
this._ws_exists = false;
return this.log("Error Creating WebSocket: " + err);
}
this._ws_exists = true;
ws.onopen = function(e) {
f._ws_open = true;