From 382701183804ee3037c827b52261161172ffb687 Mon Sep 17 00:00:00 2001
From: Sami Spets <savasp@utu.fi>
Date: Fri, 13 Dec 2019 09:25:36 +0200
Subject: [PATCH] Minor changes in the client index.js

---
 web-service/public/js/bundle.js | 5 +++--
 web-service/public/js/index.js  | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/web-service/public/js/bundle.js b/web-service/public/js/bundle.js
index df7eec769..841fec172 100644
--- a/web-service/public/js/bundle.js
+++ b/web-service/public/js/bundle.js
@@ -107,9 +107,10 @@ createCard = (url, viewers) => {
 
 
 createPeer = () => {
+    peer = null;
     // FOR PRODUCTION
-    const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname);
-    // const ws = new WebSocket("ws://localhost:8080")
+    // const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname);
+    const ws = new WebSocket("ws://localhost:8080")
     ws.binaryType = "arraybuffer";
     peer = new Peer(ws)
 }
diff --git a/web-service/public/js/index.js b/web-service/public/js/index.js
index 8ea42a108..f791757d7 100644
--- a/web-service/public/js/index.js
+++ b/web-service/public/js/index.js
@@ -106,9 +106,10 @@ createCard = (url, viewers) => {
 
 
 createPeer = () => {
+    peer = null;
     // FOR PRODUCTION
-    const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname);
-    // const ws = new WebSocket("ws://localhost:8080")
+    // const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname);
+    const ws = new WebSocket("ws://localhost:8080")
     ws.binaryType = "arraybuffer";
     peer = new Peer(ws)
 }
-- 
GitLab