diff --git a/cryptide_project/server/server.js b/cryptide_project/server/server.js index 4452f1d..beeca22 100644 --- a/cryptide_project/server/server.js +++ b/cryptide_project/server/server.js @@ -93,6 +93,9 @@ io.on('connection', (socket) => { if (tab[i].id === socket.id){ tab.splice(i, 1) io.to(k).emit("player left", tab, i) + if (tab.filter((p) => p.type=="User").length == 0){ + map.delete(k) + } } } } diff --git a/cryptide_project/src/AdressSetup.ts b/cryptide_project/src/AdressSetup.ts index 8af8f06..a4b7b57 100644 --- a/cryptide_project/src/AdressSetup.ts +++ b/cryptide_project/src/AdressSetup.ts @@ -3,8 +3,7 @@ const ADRESSE_WEBSERVER = "http://localhost:3002" const ADRESSE_DBSERVER = "http://localhost:3003" const tmp = ADRESSE_DBSERVER -const mp2 = ADRESSE_WEBSERVER - +const tmp2 = ADRESSE_WEBSERVER const ADRESSE_WEBSITE = ""