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:
parent
d6619af92e
commit
c9bd39de8a
6 changed files with 49 additions and 16 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue