disconnected

master
km0 3 years ago
parent f58c3bcf53
commit be0674ff3e

@ -24,9 +24,3 @@ def add_bowl(id):
def add_bowl(id): def add_bowl(id):
handle = id handle = id
print('Handle is connected!') print('Handle is connected!')
@socketio.on('disconnect')
def test_disconnect(socket):
print('Client disconnected', socket.id)

@ -12,3 +12,7 @@ socket.on("connect", function () {
socket.on("disconnect", function () { socket.on("disconnect", function () {
socket.emit("disconnect bowl", { id: socket.id }); socket.emit("disconnect bowl", { id: socket.id });
}); });
window.onbeforeunload = function () {
socket.emit("disconnect bowl", { id: socket.id });
};

Loading…
Cancel
Save