mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 07:47:50 +01:00
manually close socket when window is unloaded
This commit is contained in:
@@ -18,6 +18,9 @@ import { InProgress } from '../game_state/states/InProgress.js';
|
||||
import { Ended } from '../game_state/states/Ended.js';
|
||||
|
||||
export const gameHandler = (socket, window, gameDOM) => {
|
||||
window.onunload = () => {
|
||||
socket.close();
|
||||
}
|
||||
document.body.innerHTML = gameDOM + document.body.innerHTML;
|
||||
injectNavbar();
|
||||
const connectionHandler = () => {
|
||||
|
||||
Reference in New Issue
Block a user