Disconnect only if user confirms

This commit is contained in:
2021-06-10 16:27:32 +02:00
parent aa0e6dd448
commit 28c9ccf5be
2 changed files with 4 additions and 2 deletions

View File

@@ -2,7 +2,9 @@ let socket;
let connected = false;
function start_chat() {
socket = io();
socket = io("/", {
closeOnBeforeunload: false
});
socket.on('login', function () {
connected = true;