Skip to content

Commit

Permalink
network: ignore errors in websocket constructor (#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
copy committed May 10, 2024
1 parent 767e7a6 commit cf6b340
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/browser/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,16 @@ NetworkAdapter.prototype.connect = function()

this.last_connect_attempt = Date.now();

this.socket = new WebSocket(this.url);
try
{
this.socket = new WebSocket(this.url);
}
catch(e)
{
console.error(e);
return;
}

this.socket.binaryType = "arraybuffer";

this.socket.onopen = this.handle_open.bind(this);
Expand Down

0 comments on commit cf6b340

Please sign in to comment.