Remove all references to socket.io
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
let socket = null;
|
||||
let characteristic = null;
|
||||
let prevRes = null;
|
||||
|
||||
@@ -25,29 +24,8 @@ async function connect(props) {
|
||||
characteristic.addEventListener("characteristicvaluechanged", props.onChange);
|
||||
console.log("> Characteristic value changed event listener added");
|
||||
|
||||
btn.classList.remove("bg-red-600");
|
||||
btn.classList.remove("bg-blue-600");
|
||||
btn.classList.add("bg-green-600");
|
||||
/*
|
||||
socket = io({
|
||||
reconnection: true,
|
||||
reconnectionDelay: 1000,
|
||||
reconnectionAttempts: 20,
|
||||
forceNew: true,
|
||||
});
|
||||
|
||||
socket.on("connect", () => {
|
||||
btn.classList.remove("bg-red-600");
|
||||
btn.classList.add("bg-green-600");
|
||||
});
|
||||
|
||||
socket.on("disconnect", (reason) => {
|
||||
if (reason === "io server disconnect") {
|
||||
// the disconnection was initiated by the server, you need to reconnect manually
|
||||
socket.connect();
|
||||
}
|
||||
// else the socket will automatically try to reconnect
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
async function disconnect() {
|
||||
|
||||
Reference in New Issue
Block a user