Skip to content

Commit

Permalink
remove old ws server
Browse files Browse the repository at this point in the history
  • Loading branch information
PWhiddy committed Feb 16, 2024
1 parent 00888e3 commit 01d11cb
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions visualizer_live.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const app = new PIXI.Application({
}
});

let socketOld = null;
let socket = null;

let lastFrameTime = Date.now();
Expand Down Expand Up @@ -179,10 +178,6 @@ PIXI.Assets.load([

const refreshWS = () => {
console.log("Refreshing WebSocket connection.");
if (socketOld !== null) {
socketOld.close(); // Close the current connection
}
socketOld = initializeWebSocket("wss://poke-ws-test-ulsjzjzwpa-ue.a.run.app/receive"); // Reinitialize the connection
if (socket !== null) {
socket.close(); // Close the current connection
}
Expand Down

0 comments on commit 01d11cb

Please sign in to comment.